From 896e7f2d8dd7fa190c4514043b3aa5fcfa20c65f Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 2 Oct 2017 08:33:30 +0000 Subject: compile.c: fix stack consitency error * compile.c (iseq_compile_each0): fix stack consitency error on attr-assign with safe navigation operator when the receiver is nil, should pop it too. [ruby-core:83078] [Bug #13964] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_call.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') diff --git a/test/ruby/test_call.rb b/test/ruby/test_call.rb index 4496d78210..18203ce731 100644 --- a/test/ruby/test_call.rb +++ b/test/ruby/test_call.rb @@ -52,6 +52,7 @@ class TestCall < Test::Unit::TestCase assert_nil(o&.x) assert_nothing_raised(NoMethodError) {o&.x = 6} assert_nothing_raised(NoMethodError) {o&.x *= 7} + assert_nothing_raised(NoMethodError) {o&.x *= 8; [].each {}} end def test_safe_call_evaluate_arguments_only_method_call_is_made -- cgit v1.2.3