diff options
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 8 | ||||
-rw-r--r-- | spec/runtime/environment_rb_spec.rb | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 8d8aefe2f9..5ec1143361 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -10,7 +10,13 @@ module Gem attr_accessor :source, :location def load_paths - require_paths.map {|p| File.join(full_gem_path, p) } + require_paths.map do |require_path| + if require_path.include?(full_gem_path) + require_path + else + File.join(full_gem_path, require_path) + end + end end def groups diff --git a/spec/runtime/environment_rb_spec.rb b/spec/runtime/environment_rb_spec.rb index f882a7938b..9a03f9b7bc 100644 --- a/spec/runtime/environment_rb_spec.rb +++ b/spec/runtime/environment_rb_spec.rb @@ -205,7 +205,7 @@ describe "environment.rb file" do bundle :lock bundle %|exec ruby -e "require 'bundler'; Bundler.setup"| - err.should == "" + err.should be_empty end end end |