mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[Bug #7759] Fix instance variable names to be checked
This commit is contained in:
parent
4edd9b072c
commit
d9e6e6fb60
1 changed files with 2 additions and 2 deletions
|
@ -570,13 +570,13 @@ class TestMarshal < Test::Unit::TestCase
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue