summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maximechevalierb@gmail.com>2021-05-07 16:10:09 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:35 -0400
commitc9feb72b650a2e8f2ab0eab164e1ffd52f739396 (patch)
tree1ca699d642cfda3d3c217203039921a231afcae2 /bootstraptest
parente2c1d69331a037b7c26508d69d6e1ed0f6e70961 (diff)
Implement opt_mod as call to interpreter function (#29)
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 663977f0ca..abbe40e9e7 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -1,3 +1,13 @@
+# Test for opt_mod
+assert_equal '2', %q{
+ def mod(a, b)
+ a % b
+ end
+
+ mod(7, 5)
+ mod(7, 5)
+}
+
# BOP redefined methods work when JIT compiled
assert_equal 'false', %q{
def less_than x