Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
[Inline] Remove dependence on #define_singleton_method so things work…
Browse files Browse the repository at this point in the history
… on 1.8.7
  • Loading branch information
segiddins committed Mar 17, 2015
1 parent d8195cb commit 43a3252
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/bundler/inline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ def definition.lock(file); end
runtime.setup_environment
runtime.setup.require

Bundler.send(:define_singleton_method, :root, old_root)
bundler_module = class << Bundler; self; end
Bundler.send(:define_method, :root, old_root)
end
10 changes: 4 additions & 6 deletions spec/runtime/inline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ def script(code, options = {})
path "#{lib_path}"
gem "two"
end
puts "success"
RUBY

expect(out).to eq("two\nsuccess")
expect(out).to eq("two")
expect(exitstatus).to be_zero if exitstatus

script <<-RUBY, :expect_err => true
gemfile do
Expand All @@ -81,10 +80,9 @@ def script(code, options = {})
source "file://#{gem_repo1}"
gem "rack"
end
puts "success"
RUBY

expect(out).to eq("Rack's post install message\nsuccess")
expect(out).to eq("Rack's post install message")
expect(exitstatus).to be_zero if exitstatus
end
end

0 comments on commit 43a3252

Please sign in to comment.