aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-03-21 04:14:22 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-03-21 04:39:53 -0700
commit21de164f8a3e501f9c66336e6e9f10e23daa43b3 (patch)
tree36ce124f3ac93cacd28886ec41894819da83af0d /activesupport/lib/active_support/core_ext
parent54cf0fc476b2d77adb8a124c27a79a048fa4ddb5 (diff)
downloadrails-21de164f8a3e501f9c66336e6e9f10e23daa43b3.tar.gz
rails-21de164f8a3e501f9c66336e6e9f10e23daa43b3.tar.bz2
rails-21de164f8a3e501f9c66336e6e9f10e23daa43b3.zip
Convert LoadError extension modules to class reopens
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/load_error.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/load_error.rb b/activesupport/lib/active_support/core_ext/load_error.rb
index 6165e95443..f36a21818f 100644
--- a/activesupport/lib/active_support/core_ext/load_error.rb
+++ b/activesupport/lib/active_support/core_ext/load_error.rb
@@ -24,15 +24,12 @@ class MissingSourceFile < LoadError #:nodoc:
] unless defined?(REGEXPS)
end
-module ActiveSupport #:nodoc:
- module CoreExtensions #:nodoc:
- module LoadErrorExtensions #:nodoc:
- module LoadErrorClassMethods #:nodoc:
- def new(*args)
- (self == LoadError && MissingSourceFile.from_message(args.first)) || super
- end
- end
- ::LoadError.extend(LoadErrorClassMethods)
+class LoadError
+ def self.new(*args)
+ if self == LoadError
+ MissingSourceFile.from_message(args.first)
+ else
+ super
end
end
end