summaryrefslogtreecommitdiff
path: root/test/ruby/test_clone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_clone.rb')
-rw-r--r--test/ruby/test_clone.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_clone.rb b/test/ruby/test_clone.rb
index 216eaa39d2..775c9ed848 100644
--- a/test/ruby/test_clone.rb
+++ b/test/ruby/test_clone.rb
@@ -73,6 +73,13 @@ class TestClone < Test::Unit::TestCase
assert_equal(cloned_obj.instance_variable_get(:@a), 1)
end
+ def test_proc_obj_id_flag_reset
+ # [Bug #20250]
+ proc = Proc.new { }
+ proc.object_id
+ proc.clone.object_id # Would crash with RUBY_DEBUG=1
+ end
+
def test_user_flags
assert_separately([], <<-EOS)
#