diff options
author | John Hawthorn <john@hawthorn.email> | 2021-11-05 13:54:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 16:54:23 -0400 |
commit | 9cc2c74b8381670f584ed31b81aedb66c8f61b34 (patch) | |
tree | 72655fb202604e9e631a615521e0867fd8a25974 /test/ruby | |
parent | 91a9062626733c7d11ea4795bd1957a21f2adec6 (diff) |
YJIT: Implement checkkeyword (#5083)
Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_yjit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index ad40ad1988..f0d899e908 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -397,6 +397,16 @@ class TestYJIT < Test::Unit::TestCase RUBY end + def test_checkkeyword + assert_compiles(<<~'RUBY', insns: %i[checkkeyword], result: [2, 5]) + def foo(foo: 1+1) + foo + end + + [foo, foo(foo: 5)] + RUBY + end + def test_invokebuiltin assert_compiles(<<~RUBY) def foo(obj) |