aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/load_error.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/load_error.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/load_error.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/load_error.rb b/activesupport/lib/active_support/core_ext/load_error.rb
index fac4639eed..6165e95443 100644
--- a/activesupport/lib/active_support/core_ext/load_error.rb
+++ b/activesupport/lib/active_support/core_ext/load_error.rb
@@ -8,7 +8,7 @@ class MissingSourceFile < LoadError #:nodoc:
def is_missing?(path)
path.gsub(/\.rb$/, '') == self.path.gsub(/\.rb$/, '')
end
-
+
def self.from_message(message)
REGEXPS.each do |regexp, capture|
match = regexp.match(message)
@@ -16,12 +16,12 @@ class MissingSourceFile < LoadError #:nodoc:
end
nil
end
-
+
REGEXPS = [
[/^no such file to load -- (.+)$/i, 1],
[/^Missing \w+ (file\s*)?([^\s]+.rb)$/i, 2],
[/^Missing API definition file in (.+)$/i, 1]
- ]
+ ] unless defined?(REGEXPS)
end
module ActiveSupport #:nodoc: