diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-18 08:53:20 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-18 08:53:20 +0000 |
commit | 4989a071351199957f6879f842534badd15ba2b6 (patch) | |
tree | 294171d8004a44674d4824b450409bcf891fe1cb /test | |
parent | 892deeb55b0cdb3c58ffa96cd6b9fef87c822648 (diff) |
merge revision(s) 54628: [Backport #12296]
* compile.c (iseq_peephole_optimize): should not replace the
current target INSN, not to follow the replaced dangling link in
the caller. [ruby-core:74993] [Bug #11816]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_optimization.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 8804931bca..17c8a3210b 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -390,4 +390,9 @@ class TestRubyOptimization < Test::Unit::TestCase end assert_nil result, '[ruby-dev:49423] [Bug #11804]' end + + def test_nil_safe_conditional_assign + bug11816 = '[ruby-core:74993] [Bug #11816]' + assert_ruby_status([], 'nil&.foo &&= false', bug11816) + end end |