summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 64299e004e..7a3e6e5e70 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -3800,3 +3800,18 @@ assert_equal '[{"/a"=>"b", :as=>:c, :via=>:post}, [], nil]', %q{
post "/a" => "b", as: :c
}
+
+# Test rest and kw_args
+assert_equal '[[["test"], nil, true], [["test"], :base, true]]', %q{
+ def my_func(*args, base: nil, sort: true)
+ [args, base, sort]
+ end
+
+ def calling_my_func
+ result = []
+ result << my_func("test")
+ result << my_func("test", base: :base)
+ end
+
+ calling_my_func
+}