diff options
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r-- | test/ruby/envutil.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index dcdd857798..6006ae75b4 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -193,8 +193,12 @@ module Test assert(status.success?, m) end - def assert_separately(args, file, line, src) - opt = {} + def assert_separately(args, file = nil, line = nil, src, **opt) + unless file and line + loc, = caller_locations(1,1) + file ||= loc.path + line ||= loc.lineno + end src = <<eom require 'test/unit';include Test::Unit::Assertions;begin;#{src} ensure |