diff options
author | Jean Boussier <[email protected]> | 2023-11-03 10:42:20 +0100 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2023-11-03 11:52:17 +0100 |
commit | 35da6f864a05624433be2c8059b87d30b899b370 () | |
tree | 5e493a6b652a53923408e1f7feff514d08372259 | |
parent | 1f1b9b0942ec12dde1af8000f8cb84692904fccc (diff) |
rb_ivar_defined: handle complex modules
It was assuming only objects can be complex.
-rw-r--r-- | test/ruby/test_shapes.rb | 39 | ||||
-rw-r--r-- | variable.c | 22 |
2 files changed, 60 insertions, 1 deletions
@@ -345,6 +345,45 @@ class TestShapes < Test::Unit::TestCase end; end def test_run_out_of_shape_remove_instance_variable assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") begin; @@ -1809,7 +1809,27 @@ rb_ivar_defined(VALUE obj, ID id) if (SPECIAL_CONST_P(obj)) return Qfalse; if (rb_shape_obj_too_complex(obj)) { VALUE idx; - if (!rb_st_lookup(ROBJECT_IV_HASH(obj), id, &idx)) { return Qfalse; } |