summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-18 07:07:03 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-18 07:07:03 +0000
commit6ee3a2cd1595fad72cc777c128394c413362141e (patch)
tree6aa0b71a6be9c309e8335e5f2e7baa36a7af2ca0 /test/ruby
parent0a38e38aeab8aff97550288ee1edf3c325a3c000 (diff)
compile.c: fix dangling link
* 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/trunk@54628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_optimization.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb
index c336930440..605e0306fa 100644
--- a/test/ruby/test_optimization.rb
+++ b/test/ruby/test_optimization.rb
@@ -424,4 +424,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