diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-12-24 19:22:13 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-12-24 21:29:40 -0500 |
| commit | 7002e776944ddfd362cea253d18d02bc250fe9f7 (patch) | |
| tree | 1aa1b9479a6dc76251eac1cf2226a3af3f404683 /test/ruby | |
| parent | e233730846fd2634208c3c568c49b76bf3b29a0b (diff) | |
Fix Symbol#inspect for GC compaction
The test fails when RGENGC_CHECK_MODE is turned on:
1) Failure:
TestSymbol#test_inspect_under_gc_compact_stress [test/ruby/test_symbol.rb:123]:
<":testing"> expected but was
<":\x00\x00\x00\x00\x00\x00\x00">.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_symbol.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 1d2a18d734..7f75ecd90e 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -118,6 +118,12 @@ class TestSymbol < Test::Unit::TestCase end end + def test_inspect_under_gc_compact_stress + EnvUtil.under_gc_compact_stress do + assert_inspect_evaled(':testing') + end + end + def test_name assert_equal("foo", :foo.name) assert_same(:foo.name, :foo.name) |
