diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-05 07:25:27 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-05 07:25:27 +0000 |
commit | a106b310e5bbe678022b127b9d32bb0a55708002 (patch) | |
tree | b82f29537e864bd9d30fd61662ca90c45cdf85c2 /test | |
parent | 8efeb603fee5ad417d1fad69be41228458a78b75 (diff) | |
download | ruby-a106b310e5bbe678022b127b9d32bb0a55708002.tar.gz |
vm_method.c: drop include_all flag
* vm_method.c (rb_obj_respond_to): drop optional include_all flag if
respond_to? method is defined in old style. [Bug #7722]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_marshal.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 4dcdb605ab..722871424d 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -550,4 +550,16 @@ class TestMarshal < Test::Unit::TestCase assert_raise(TypeError) {Marshal.load("\x04\x08IM\x1cTestMarshal::TestModule\x06:\x0e@ivar_bug\"\x08bug")} assert_not_operator(TestModule, :instance_variable_defined?, :@bug) end + + class TestForRespondToFalse + def respond_to?(a) + false + end + end + + def test_marshal_respond_to_arity + assert_nothing_raised(ArgumentError, '[Bug #7722]') do + Marshal.dump(TestForRespondToFalse.new) + end + end end |