diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-13 04:06:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-13 04:06:40 +0000 |
commit | 06675418948d45f5448c7b722f1e7c990f5c89bc (patch) | |
tree | 5f07d9ecba8ac6b5ad25ad43947288286a96ef82 /test/ruby/test_method.rb | |
parent | cd9d004e7ff8ec567bc10f067260ee4da33d028d (diff) |
method transplanting
* proc.c (umethod_bind): allow another form of method transplanting
from a module via UnboundMethod. [ruby-core:34267][Feature #4254]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r-- | test/ruby/test_method.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 06c1c2c08f..c8f55e20e5 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -206,6 +206,10 @@ class TestMethod < Test::Unit::TestCase def o.bar; end m = o.method(:bar).unbind assert_raise(TypeError) { m.bind(Object.new) } + + feature4254 = '[ruby-core:34267]' + m = M.instance_method(:meth) + assert_equal(:meth, m.bind(Object.new).call, feature4254) end def test_define_method |