Skip to content

Commit

Permalink
Merge pull request iij#13 from ksss/loc
Browse files Browse the repository at this point in the history
Support after mruby v1.3
  • Loading branch information
tsahara authored Apr 6, 2018
2 parents 5b79388 + 8cc45d9 commit 929d570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mrblib/mtest_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ 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 {|l| !l.include?(':in MTest::')}
loc = e.backtrace.find {|l| l.include?(meth)}
if loc
idx = loc.rindex(':in ')
loc = idx.nil? ? "#{loc}: #{e.message}" : "#{loc[0, idx]}: #{e.message} (#{e.class})"
Expand Down

0 comments on commit 929d570

Please sign in to comment.