summaryrefslogtreecommitdiff
path: root/bootstraptest/test_insns.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/test_insns.rb')
-rw-r--r--bootstraptest/test_insns.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/bootstraptest/test_insns.rb b/bootstraptest/test_insns.rb
index 73a9d501f1..2b0f2584c5 100644
--- a/bootstraptest/test_insns.rb
+++ b/bootstraptest/test_insns.rb
@@ -414,10 +414,25 @@ tests = [
]
# normal path
-tests.compact.each {|(insn, expr, *a)| assert_equal 'true', expr, insn, *a }
+tests.compact.each do |(insn, expr, *a)|
+ if a.last.is_a?(Hash)
+ a = a.dup
+ kw = a.pop
+ assert_equal 'true', expr, insn, *a, **kw
+ else
+ assert_equal 'true', expr, insn, *a
+ end
+end
+
# with trace
tests.compact.each {|(insn, expr, *a)|
progn = "set_trace_func(proc{})\n" + expr
- assert_equal 'true', progn, 'trace_' + insn, *a
+ if a.last.is_a?(Hash)
+ a = a.dup
+ kw = a.pop
+ assert_equal 'true', progn, 'trace_' + insn, *a, **kw
+ else
+ assert_equal 'true', progn, 'trace_' + insn, *a
+ end
}