mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 22:45:03 +02:00
compile.c: popped hash
* compile.c (compile_array): skip creating new hash if preceeding elements are popped all. [ruby-core:85486] [Bug #14459] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1a45a3a797
commit
63abedabf8
2 changed files with 15 additions and 4 deletions
|
@ -709,6 +709,11 @@ class TestRubyOptimization < Test::Unit::TestCase
|
|||
bug = '[ruby-core:84340] [Bug #14201]'
|
||||
eval("{**(bug = nil; {})};42")
|
||||
assert_nil(bug)
|
||||
|
||||
bug = '[ruby-core:85486] [Bug #14459]'
|
||||
h = {}
|
||||
assert_equal(bug, eval('{ok: 42, **h}; bug'))
|
||||
assert_equal(:ok, eval('{ok: bug = :ok, **h}; bug'))
|
||||
end
|
||||
|
||||
def test_overwritten_blockparam
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue