mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
26ae645501
commit
71c8cf27db
2 changed files with 24 additions and 1 deletions
|
@ -6,7 +6,6 @@ Sun Nov 9 23:25:49 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* vm_insnhelper.c (vm_yield_with_cfunc): push defined class and
|
||||
bound proc method entry to the control frame.
|
||||
|
||||
|
||||
Sun Nov 9 22:46:13 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/open-uri: Test server log in server thread.
|
||||
|
|
24
test/-ext-/proc/test_bmethod.rb
Normal file
24
test/-ext-/proc/test_bmethod.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue