summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorywenc <ywenc@github.com>2023-07-26 10:38:59 -0400
committerGitHub <noreply@github.com>2023-07-26 10:38:59 -0400
commit8ca399d64023fd13bd17bc38132610ccb2ccc598 (patch)
treef2d178cb6184c4a401a08c9a551c9e7b23ef11e1 /test/ruby
parent786a864900ceee6ed89d7df81698bbbe7e7bd6ae (diff)
Implement `opt_aref_with` instruction (#8118)
Implement gen_opt_aref_with Vm opt_aref_with is available Test opt_aref_with Stats for opt_aref_with Co-authored-by: jhawthorn <jhawthorn@github.com>
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'test/ruby')
-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