Permalink
Browse files

Convert LoadError extension modules to class reopens

  • Loading branch information...
jeremy committed Mar 21, 2009
1 parent 54cf0fc commit 21de164f8a3e501f9c66336e6e9f10e23daa43b3
Showing with 6 additions and 9 deletions.
  1. +6 −9 activesupport/lib/active_support/core_ext/load_error.rb
@@ -24,15 +24,12 @@ def self.from_message(message)
] 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

0 comments on commit 21de164

Please sign in to comment.