summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-11 16:42:43 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-11 16:42:43 +0000
commit8ab9a65791ccdf361f39a36292fe411c26683922 (patch)
tree05458a49bca6f08c47ac4c7f00a29c398c872678 /object.c
parentc5ce07eed74b9ea51a1ca47069efcf042a859e3c (diff)
merge revision(s) 40021,42380: [Backport #8686]
test_method.rb: split * test/ruby/test_method.rb (test_define_method): split for each tests. * object.c (rb_class_inherited_p): allow iclasses to be tested for inheritance. [Bug #8686] [ruby-core:56174] * test/ruby/test_method.rb: add test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@42914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index a782075b85..dc606db067 100644
--- a/object.c
+++ b/object.c
@@ -1482,7 +1482,7 @@ rb_class_inherited_p(VALUE mod, VALUE arg)
VALUE start = mod;
if (mod == arg) return Qtrue;
- if (!CLASS_OR_MODULE_P(arg)) {
+ if (!CLASS_OR_MODULE_P(arg) && !RB_TYPE_P(arg, T_ICLASS)) {
rb_raise(rb_eTypeError, "compared with non class/module");
}
arg = RCLASS_ORIGIN(arg);