diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_class.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 456362ef21..6fc461ed08 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -841,4 +841,12 @@ CODE klass.define_method(:bar) {} assert_equal klass, klass.remove_method(:bar), '[Bug #19164]' end + + def test_method_table_assignment_just_after_class_init + assert_normal_exit "#{<<~"begin;"}\n#{<<~'end;'}", 'm_tbl assignment should be done only when Class object is not promoted' + begin; + GC.stress = true + class C; end + end; + end end |
