diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-08-20 12:29:51 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 12:39:31 -0700 |
commit | 856bb3c35d5d81481b2e5dd00353298e8a0c2ee7 (patch) | |
tree | 02844dc2808b315f85ecf71f460e2d49e43d53d4 /bootstraptest/test_insns.rb | |
parent | 42adc5bc6bb532e20bf2191ad99781ee701dea36 (diff) | |
download | ruby-856bb3c35d5d81481b2e5dd00353298e8a0c2ee7.tar.gz |
Fix remaining warning issues in the tests due to keyword argument separation
Diffstat (limited to 'bootstraptest/test_insns.rb')
-rw-r--r-- | bootstraptest/test_insns.rb | 19 |
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 } |