aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBoggs <hello@boggs.xyz>2016-06-28 04:44:24 +0800
committerBoggs <hello@boggs.xyz>2016-06-28 09:20:35 +0800
commit5a1abe074aa044fc89234bcf69d66ba4336758f1 (patch)
treed68d6d0270e4df2b6c0d6328b8e6e47ab3b625d0 /lib
parent04cb8658579aa2c7aeb383c21909380d07189ded (diff)
downloadbundler-5a1abe074aa044fc89234bcf69d66ba4336758f1.tar.gz
Use `Bundler::VERSION` for spec
Add TODO to change to warn in 2.0 `dup` string for old rgv `dup` string for old rgv
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--lib/bundler/postit_trampoline.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 6e5d03ad..07950c90 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -118,7 +118,7 @@ module Bundler
def warn_if_outdated
return if ENV["BUNDLE_POSTIT_TRAMPOLINING_VERSION"].nil?
- installed_version = Gem::Version.new(ENV["BUNDLE_POSTIT_TRAMPOLINING_VERSION"])
+ installed_version = Gem::Version.new(ENV["BUNDLE_POSTIT_TRAMPOLINING_VERSION"].dup)
running_version = Gem::Version.new(Bundler::VERSION)
if Bundler.settings[:warned_version].nil? || running_version > Gem::Version.new(Bundler.settings[:warned_version])
Bundler.settings[:warned_version] = running_version
diff --git a/lib/bundler/postit_trampoline.rb b/lib/bundler/postit_trampoline.rb
index c464af38..4e9450c6 100644
--- a/lib/bundler/postit_trampoline.rb
+++ b/lib/bundler/postit_trampoline.rb
@@ -49,9 +49,10 @@ rescue LoadError, NameError
nil
end
-if Gem::Version.new(running_version) >= Gem::Version.new("1.13.0.pre.1")
+if Gem::Version.new(running_version) >= Gem::Version.new("1.13.0.pre.1".dup)
ENV["BUNDLE_POSTIT_TRAMPOLINING_VERSION"] = installed_version.to_s
elsif ARGV.any? {|a| %w(install i).include? a }
+ # TODO: Change this to warn in Bundler 2.0
puts <<-WARN.strip
You're running Bundler #{installed_version} but this project uses #{running_version}. To update, run `bundle update --bundler`.\n
WARN