summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-20 12:29:51 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commit856bb3c35d5d81481b2e5dd00353298e8a0c2ee7 (patch)
tree02844dc2808b315f85ecf71f460e2d49e43d53d4 /bootstraptest
parent42adc5bc6bb532e20bf2191ad99781ee701dea36 (diff)
Fix remaining warning issues in the tests due to keyword argument separation
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'bootstraptest')
-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
}