diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-04-29 13:42:50 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-04-29 13:42:50 +0900 |
commit | 23375c8b81e07644517e5ad985b2fbf5e1b5d545 (patch) | |
tree | 096dd85d1c0794072aa200ddd00e88050ac676d3 /test/lib | |
parent | 330b376133e00ae418bcf01e641e127df01fbc28 (diff) | |
download | ruby-23375c8b81e07644517e5ad985b2fbf5e1b5d545.tar.gz |
Make only `mesg` can be assigned with default `fname`
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/test/unit/assertions.rb | 4 |
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 |