Bug #7722 » 0001-vm_method.c-drop-include_all-flag.patch
test/ruby/test_marshal.rb | ||
---|---|---|
assert(!c.untrusted?, bug7325)
|
||
end
|
||
end
|
||
class TestForRespondToFalse
|
||
def respond_to?(a)
|
||
false
|
||
end
|
||
end
|
||
def test_marshal_respond_to_arity
|
||
assert_nothing_raised(ArgumentError) do
|
||
Marshal.dump(TestForRespondToFalse.new)
|
||
end
|
||
end
|
||
end
|
vm_method.c | ||
---|---|---|
return basic_obj_respond_to(obj, id, !RTEST(priv));
|
||
}
|
||
else {
|
||
return RTEST(rb_funcall(obj, idRespond_to, priv ? 2 : 1, ID2SYM(id), Qtrue));
|
||
int argc = 1;
|
||
VALUE args[2];
|
||
args[0] = ID2SYM(id);
|
||
args[1] = Qtrue;
|
||
if (priv && rb_obj_method_arity(obj, idRespond_to) != 1)
|
||
argc = 2;
|
||
return RTEST(rb_funcall2(obj, idRespond_to, argc, args));
|
||
}
|
||
}
|
||