summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_jit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 44caaf49bd..888290faa9 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -239,6 +239,10 @@ class TestJIT < Test::Unit::TestCase
assert_compile_once('a = 1; { a: a }', result_inspect: '{:a=>1}', insns: %i[newhash])
end
+ def test_compile_insn_newhashfromarray
+ assert_compile_once('{ a: 1 }', result_inspect: '{:a=>1}', insns: %i[newhashfromarray])
+ end
+
def test_compile_insn_newrange
assert_compile_once('a = 1; 0..a', result_inspect: '0..1', insns: %i[newrange])
end