From a106b310e5bbe678022b127b9d32bb0a55708002 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Feb 2013 07:25:27 +0000 Subject: 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 --- test/ruby/test_marshal.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby/test_marshal.rb') 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 -- cgit v1.2.3