diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 14:33:19 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 14:33:19 +0000 |
commit | 71c8cf27dbf049aa8e91550ae0b04bc1bca6ee3f (patch) | |
tree | 504e9913bdcd3070d3374269d2699efa3b24282a /test | |
parent | 26ae6455014e0155cf37a3a0b77ed7323e15ed39 (diff) | |
download | ruby-71c8cf27dbf049aa8e91550ae0b04bc1bca6ee3f.tar.gz |
test_bmethod.rb: super in bmethod test
* test/-ext-/proc/test_bmethod.rb (test_super_in_bmethod): super
in bmethod test for [Feature #10195].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/proc/test_bmethod.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/-ext-/proc/test_bmethod.rb b/test/-ext-/proc/test_bmethod.rb new file mode 100644 index 0000000000..09f52140b9 --- /dev/null +++ b/test/-ext-/proc/test_bmethod.rb @@ -0,0 +1,24 @@ +require 'test/unit' +require '-test-/proc' + +class TestProc < Test::Unit::TestCase + class TestBMethod < Test::Unit::TestCase + end +end + +class TestProc::TestBMethod + class Base + def foo(*a) + a + end + end + + class Bound < Base + define_method(:foo, Bug::Proc.make_caller(42)) + end + + def test_super_in_bmethod + obj = Bound.new + assert_equal([1, 42], obj.foo(1)) + end +end |