lib/milton.rb in citrusbyte-milton-0.3.4 vs lib/milton.rb in citrusbyte-milton-0.3.5
- old
+ new
@@ -99,10 +99,11 @@
# dynamic +require+)
def try_require(path, message)
begin
require path
rescue LoadError => e
- raise LoadError.new(message + " (failed to require #{path})")
+ raise LoadError.new(message + " (failed to require #{path})") if e.message =~ Regexp.new(path)
+ raise e
end
end
module_function :try_require
end