diff options
| author | Jean Boussier <byroot@ruby-lang.org> | 2024-02-09 13:54:06 +0100 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2024-02-09 17:38:54 +0100 |
| commit | d19d683a354530a27b4cbb049223f8dc70c75849 (patch) | |
| tree | 4713b9d23f32b57ec2bc92e80fa06fd21bff13c8 /test/ruby | |
| parent | cf1cd215c0a057da123ec9753091154230b3dc97 (diff) | |
rb_obj_setup: do not copy RUBY_FL_SEEN_OBJ_ID
[Bug #20250]
We're seting up a new instance, so it never had an associated
object_id.
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_clone.rb | 7 |
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) # |
