lib/raven/backtrace.rb in sentry-raven-1.2.3 vs lib/raven/backtrace.rb in sentry-raven-2.0.0
- old
+ new
@@ -1,18 +1,17 @@
## Inspired by Rails' and Airbrake's backtrace parsers.
module Raven
-
# Front end to parsing the backtrace for each notice
class Backtrace
# Handles backtrace parsing line by line
class Line
# regexp (optionnally allowing leading X: for windows support)
- RUBY_INPUT_FORMAT = %r{^((?:[a-zA-Z]:)?[^:]+|<.*>):(\d+)(?::in `([^']+)')?$}
+ RUBY_INPUT_FORMAT = /^((?:[a-zA-Z]:)?[^:]+|<.*>):(\d+)(?::in `([^']+)')?$/
# org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
- JAVA_INPUT_FORMAT = %r{^(.+)\.([^\.]+)\(([^\:]+)\:(\d+)\)$}
+ JAVA_INPUT_FORMAT = /^(.+)\.([^\.]+)\(([^\:]+)\:(\d+)\)$/
# The file portion of the line (such as app/models/user.rb)
attr_reader :file
# The line number portion of the line
@@ -45,10 +44,10 @@
self.number = number.to_i
self.method = method
end
def in_app
- if self.file =~ self.class.in_app_pattern
+ if file =~ self.class.in_app_pattern
true
else
false
end
end