diff options
author | Terence Lee <hone02@gmail.com> | 2012-08-14 01:49:56 -0500 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2012-08-14 01:49:56 -0500 |
commit | 8acc82f39d03f9cf0bf1016debdc2e80fe4264fc (patch) | |
tree | b5f9cf862e5b87d6083b7c4ade9d3fd6fe840f10 | |
parent | 3947232eb0cf27a1720fd2ff293248c86a1735a0 (diff) | |
download | bundler-8acc82f39d03f9cf0bf1016debdc2e80fe4264fc.tar.gz |
raise the original error mesasge here
-rw-r--r-- | lib/bundler/runtime.rb | 3 | ||||
-rw-r--r-- | spec/runtime/require_spec.rb | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb index 0f71e9e482..2611fa6339 100644 --- a/lib/bundler/runtime.rb +++ b/lib/bundler/runtime.rb @@ -74,7 +74,8 @@ module Bundler Kernel.require namespaced_file rescue LoadError REGEXPS.find { |r| r =~ e.message } - raise if dep.autorequire || ($1 && $1.gsub('-', '/') != namespaced_file) || $1.nil? + raise if dep.autorequire || ($1 && $1.gsub('-', '/') != namespaced_file) + raise e if $1.nil? end else REGEXPS.find { |r| r =~ e.message } diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb index ced3c199ce..da65c6afee 100644 --- a/spec/runtime/require_spec.rb +++ b/spec/runtime/require_spec.rb @@ -121,8 +121,7 @@ describe "Bundler.require" do it "handles the case where regex fails" do build_lib "load-fuuu", "1.0.0" do |s| - s.write "lib/load-fuuu.rb", "require 'load/fuuu'" - s.write "lib/load/fuuu.rb", "raise LoadError.new(\"Could not open library 'libfuuu-1.0': libfuuu-1.0: cannot open shared object file: No such file or directory.\")" + s.write "lib/load-fuuu.rb", "raise LoadError.new(\"Could not open library 'libfuuu-1.0': libfuuu-1.0: cannot open shared object file: No such file or directory.\")" end gemfile <<-G |