mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
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
This commit is contained in:
parent
0a38e38aea
commit
6ee3a2cd15
3 changed files with 16 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue