summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-05 01:02:22 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-05 01:02:22 +0000
commit5e98991f1bf475cedff781e3ae2f2307c884f52d (patch)
tree061775479ddf4fc9c2af3745fcee9cb3107a4c80 /test
parentb649592c4ab31c5ac0cbbd0c5136b7cbbeb82c32 (diff)
* 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/trunk@42380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_method.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index c11dcf9269..18c25f14d1 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -262,6 +262,22 @@ class TestMethod < Test::Unit::TestCase
end
end
+ def test_define_singleton_method_with_extended_method
+ bug8686 = "[ruby-core:56174]"
+
+ m = Module.new do
+ extend self
+
+ def a
+ "a"
+ end
+ end
+
+ assert_nothing_raised do
+ m.define_singleton_method(:a, m.method(:a))
+ end
+ end
+
def test_define_method_transplating
feature4254 = '[ruby-core:34267]'
m = Module.new {define_method(:meth, M.instance_method(:meth))}