lib/polyglot.rb in polyglot-0.2.9 vs lib/polyglot.rb in polyglot-0.3.0

- old
+ new

@@ -2,11 +2,11 @@ require 'pathname' module Polyglot @registrations ||= {} # Guard against reloading @loaded ||= {} - + class PolyglotLoadError < LoadError; end class NestedLoadError < LoadError def initialize le @le = le @@ -50,15 +50,10 @@ @loaded[file] = true rescue LoadError => e raise Polyglot::NestedLoadError.new(e) end else - msg = "Failed to load #{file} using extensions #{(@registrations.keys+["rb"]).sort*", "}" - if defined?(MissingSourceFile) - raise MissingSourceFile.new(msg, file) - else - raise PolyglotLoadError.new(msg) - end + raise PolyglotLoadError.new("Failed to load #{file} using extensions #{(@registrations.keys+["rb"]).sort*", "}") end end end end