1
0
Fork 0
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:
nobu 2017-12-21 11:59:31 +00:00
parent 722306265d
commit 7a54b5b4ce

View file

@ -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