Skip to content

Commit

Permalink
temp: fix after the review
Browse files Browse the repository at this point in the history
According to:

* #4 (comment)
* #4 (comment)
  • Loading branch information
kyrylo committed Dec 18, 2015
1 parent d778d92 commit b31d680
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions lib/airbrake-ruby/backtrace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ def self.match_frame(regexp, stackframe)
match = regexp.match(stackframe)
return match if match

unless (matched_frame = GENERIC_STACKFRAME_REGEXP.match(stackframe))
raise Airbrake::Error, "failed parsing '#{stackframe}'"
end
match = GENERIC_STACKFRAME_REGEXP.match(stackframe)
return match if match

matched_frame
raise Airbrake::Error, "can't parse '#{stackframe}'"
end
end
end
2 changes: 1 addition & 1 deletion spec/backtrace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

it "raises error" do
expect { described_class.parse(ex) }.
to raise_error(Airbrake::Error, /failed parsing/)
to raise_error(Airbrake::Error, /can't parse/)
end
end
end
Expand Down

0 comments on commit b31d680

Please sign in to comment.