diff options
author | Kevin Deisz <kevin.deisz@gmail.com> | 2021-07-06 14:45:36 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:37 -0400 |
commit | b0ae4fdcfbe0004908adcc44f0ae0e3a3762917b (patch) | |
tree | 2740d12e5731207864178ce152a46f8e90e64119 /bootstraptest | |
parent | 4bea8af69f153b78ccac2d7b2bb7248fbd8d1c38 (diff) |
Implement opt_mult
Basically the same thing as opt_mod, but for multiplying.
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 4bf9bc4262..14b901fbf1 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -26,6 +26,16 @@ assert_equal '2', %q{ mod(7, 5) } +# Test for opt_mult +assert_equal '12', %q{ + def mult(a, b) + a * b + end + + mult(6, 2) + mult(6, 2) +} + # BOP redefined methods work when JIT compiled assert_equal 'false', %q{ def less_than x |