Skip to content

Commit

Permalink
[Bug #7759] Fix instance variable names to be checked
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 12, 2024
1 parent 4edd9b0 commit d9e6e6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/ruby/test_marshal.rb
Expand Up @@ -570,13 +570,13 @@ def test_marshal_load_ivar
def test_class_ivar
assert_raise(TypeError) {Marshal.load("\x04\x08Ic\x1bTestMarshal::TestClass\x06:\x0e@ivar_bug\"\x08bug")}
assert_raise(TypeError) {Marshal.load("\x04\x08IM\x1bTestMarshal::TestClass\x06:\x0e@ivar_bug\"\x08bug")}
assert_not_operator(TestClass, :instance_variable_defined?, :@bug)
assert_not_operator(TestClass, :instance_variable_defined?, :@ivar_bug)
end

def test_module_ivar
assert_raise(TypeError) {Marshal.load("\x04\x08Im\x1cTestMarshal::TestModule\x06:\x0e@ivar_bug\"\x08bug")}
assert_raise(TypeError) {Marshal.load("\x04\x08IM\x1cTestMarshal::TestModule\x06:\x0e@ivar_bug\"\x08bug")}
assert_not_operator(TestModule, :instance_variable_defined?, :@bug)
assert_not_operator(TestModule, :instance_variable_defined?, :@ivar_bug)
end

class TestForRespondToFalse
Expand Down

0 comments on commit d9e6e6f

Please sign in to comment.