From 8ab9a65791ccdf361f39a36292fe411c26683922 Mon Sep 17 00:00:00 2001 From: nagachika Date: Wed, 11 Sep 2013 16:42:43 +0000 Subject: 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 --- object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'object.c') 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); -- cgit v1.2.3