Skip to content

Commit bef64b4

Browse files
hsbtclaude
authored andcommitted
Avoid deep Array#== in test_spill_frames_stack
Since ruby/ruby@c65a8e03f1 checks the machine stack on the rb_funcall fast path, comparing the 1000 levels deep arrays raises SystemStackError on the mingw build of ruby-head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 442dadb commit bef64b4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎test/json/resumable_parser_test.rb‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,11 +669,10 @@ def test_spill_rvalue_stack
669669

670670
def test_spill_frames_stack
671671
json = '[' * 1000 + ']' * 1000
672-
expected = JSON.parse(json, max_nesting: 1000)
673672
@parser = new_parser(max_nesting: 1000)
674673
@parser << json
675674
assert @parser.parse
676-
assert_equal expected, @parser.value
675+
assert_equal json, JSON.generate(@parser.value, max_nesting: 1000)
677676
end
678677

679678
def test_buffer_shrink

0 commit comments

Comments
 (0)