diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 11:59:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-21 11:59:31 +0000 |
commit | 7a54b5b4cea05369e6f3a3e85b7bb88a653ed472 (patch) | |
tree | 388092622f15b16e7b358b1d2f3749f535960737 /test/ruby/test_optimization.rb | |
parent | 722306265d0a8f0df23cf084fe3252d8046b2b49 (diff) |
test for [Bug #14214]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_optimization.rb')
-rw-r--r-- | test/ruby/test_optimization.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 160f439b36..11cf1ffbfb 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -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 |