Skip to content

Commit

Permalink
Fix missing exception message.
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

yyamano committed Jan 17, 2017
1 parent 058c366 commit d266486
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mrblib/mtest_unit.rb
Original file line number Diff line number Diff line change
@@ -413,7 +413,14 @@ def print *a

def puke klass, meth, e
# dirty hack to find the actual filename and line number that the assertion failed at
loc = e.backtrace.find(Proc.new {e.inspect}) {|l| !l.include?(':in MTest::')}
loc = e.backtrace.find {|l| !l.include?(':in MTest::')}
if loc
idx = loc.rindex(':in ')
loc = idx.nil? ? "#{loc}: #{e.message}" : "#{loc[0, idx]}: #{e.message} (#{e.class})"
else
loc = e.inspect
end

e = case e
when MTest::Skip
@skips += 1

0 comments on commit d266486

Please sign in to comment.