summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo <grzuy0@gmail.com>2016-05-03 23:43:17 -0300
committerGonzalo <grzuy0@gmail.com>2016-05-03 23:46:49 -0300
commitd9e3df8ead4473faeec2eb5bee221c9c9c7696c2 (patch)
treea29bd31d0abcc9a1b2e293e5ad2a0d1891fe9898
parentd4679f7ebd3ba805d425a1f47a73acd2fba63dd2 (diff)
downloadbundler-d9e3df8ead4473faeec2eb5bee221c9c9c7696c2.tar.gz
Fixes frozen string exception when checking equivalent gemfile and lockfile (closes #4520)
-rw-r--r--lib/bundler/definition.rb2
-rw-r--r--spec/install/deploy_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index c11dc2428c..0929a2ae3c 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -434,7 +434,7 @@ module Bundler
end
def pretty_dep(dep, source = false)
- msg = "#{dep.name}"
+ msg = String.new("#{dep.name}")
msg << " (#{dep.requirement})" unless dep.requirement == Gem::Requirement.default
msg << " from the `#{dep.source}` source" if source && dep.source
msg
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 2b714b37df..d8e7ff7c08 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -172,13 +172,13 @@ describe "install with --deployment or --frozen" do
gemfile <<-G
source "file://#{gem_repo1}"
gem "rack"
- gem "rack-obama"
+ gem "rack-obama", "1.1"
G
bundle "install --frozen"
expect(out).to include("deployment mode")
expect(out).to include("You have added to the Gemfile")
- expect(out).to include("* rack-obama")
+ expect(out).to include("* rack-obama (= 1.1)")
expect(out).not_to include("You have deleted from the Gemfile")
expect(out).not_to include("You have changed in the Gemfile")
end