summaryrefslogtreecommitdiff
path: root/test/lib/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/test/unit')
-rw-r--r--test/lib/test/unit/assertions.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index caee3b18f7..51f89d5ae0 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -500,7 +500,9 @@ EOT
end
end
- def prepare_syntax_check(code, fname = caller_locations(2, 1)[0], mesg = fname.to_s, verbose: nil)
+ def prepare_syntax_check(code, fname = nil, mesg = nil, verbose: nil)
+ fname ||= caller_locations(2, 1)[0]
+ mesg ||= fname.to_s
verbose, $VERBOSE = $VERBOSE, verbose
case
when Array === fname