summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorKevin Deisz <kevin.deisz@gmail.com>2021-07-06 14:45:36 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:37 -0400
commitb0ae4fdcfbe0004908adcc44f0ae0e3a3762917b (patch)
tree2740d12e5731207864178ce152a46f8e90e64119 /bootstraptest
parent4bea8af69f153b78ccac2d7b2bb7248fbd8d1c38 (diff)
Implement opt_mult
Basically the same thing as opt_mod, but for multiplying.
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb10
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