Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on set_loop_iteration_limit on ''.repeat #3828

Open
felipefdl opened this issue Apr 25, 2024 · 0 comments
Open

Bug on set_loop_iteration_limit on ''.repeat #3828

felipefdl opened this issue Apr 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@felipefdl
Copy link

Describe the bug
When I call set_loop_iteration_limit and then evaluate code with ''.repeat, the repeat functionality does not respect the set loop iteration limit. The code below gets stuck in a loop.

To Reproduce

  let arr = [];
    while (true) {
      arr.push(' '.repeat(1024 * 1024));
    }

Expected behavior
The .repeat function should stop iterating when set_loop_iteration_limit is set, similar to how it works with normal loops.

Build environment:

  • OS: macOS
  • Version: 14.4.1 (23E224)
  • Rustc version: rustc 1.77.2 (25ef9e3d8 2024-04-09)
@felipefdl felipefdl added the bug Something isn't working label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant