mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test for [Bug #14214]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
722306265d
commit
7a54b5b4ce
1 changed files with 10 additions and 0 deletions
|
@ -708,4 +708,14 @@ class TestRubyOptimization < Test::Unit::TestCase
|
|||
eval("{**(bug = nil; {})};42")
|
||||
assert_nil(bug)
|
||||
end
|
||||
|
||||
def test_overwritten_blockparam
|
||||
obj = Object.new
|
||||
def obj.a(&block)
|
||||
block = 1
|
||||
return :ok if block
|
||||
:ng
|
||||
end
|
||||
assert_equal(:ok, obj.a())
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue