aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_yjit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_yjit.rb')
-rw-r--r--test/ruby/test_yjit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index 6e8070199d..61f86b7178 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -1289,6 +1289,14 @@ class TestYJIT < Test::Unit::TestCase
RUBY
end
+ def test_opt_aref_with
+ assert_compiles(<<~RUBY, insns: %i[opt_aref_with], result: "bar")
+ h = {"foo" => "bar"}
+
+ h["foo"]
+ RUBY
+ end
+
private
def code_gc_helpers