Skip to content

Commit 107532a

Browse files
committed
Hide patchlevel from lockfile
1 parent 66c94f6 commit 107532a

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

bundler/lib/bundler/ruby_version.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def initialize(versions, patchlevel, engine, engine_version)
4343

4444
def to_s(versions = self.versions)
4545
output = String.new("ruby #{versions_string(versions)}")
46-
output << "p#{patchlevel}" if patchlevel && patchlevel != "-1"
4746
output << " (#{engine} #{versions_string(engine_versions)})" unless engine == "ruby"
4847

4948
output
@@ -72,8 +71,7 @@ def single_version_string
7271
def ==(other)
7372
versions == other.versions &&
7473
engine == other.engine &&
75-
engine_versions == other.engine_versions &&
76-
patchlevel == other.patchlevel
74+
engine_versions == other.engine_versions
7775
end
7876

7977
def host

bundler/spec/bundler/ruby_version_spec.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
describe "#to_s" do
102102
it "should return info string with the ruby version, patchlevel, engine, and engine version" do
103-
expect(subject.to_s).to eq("ruby 2.0.0p645 (jruby 2.0.1)")
103+
expect(subject.to_s).to eq("ruby 2.0.0 (jruby 2.0.1)")
104104
end
105105

106106
context "no patchlevel" do
@@ -115,7 +115,7 @@
115115
let(:engine) { "ruby" }
116116

117117
it "should return info string with the ruby version and patchlevel" do
118-
expect(subject.to_s).to eq("ruby 2.0.0p645")
118+
expect(subject.to_s).to eq("ruby 2.0.0")
119119
end
120120
end
121121

@@ -149,12 +149,6 @@
149149
it_behaves_like "two ruby versions are not equal"
150150
end
151151

152-
context "the patchlevels do not match" do
153-
let(:other_patchlevel) { "21" }
154-
155-
it_behaves_like "two ruby versions are not equal"
156-
end
157-
158152
context "the engines do not match" do
159153
let(:other_engine) { "ruby" }
160154

bundler/spec/install/gemfile/ruby_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def locked_ruby_version
8383
myrack
8484
8585
RUBY VERSION
86-
ruby 2.1.4p422
86+
ruby 2.1.4
8787
8888
BUNDLED WITH
8989
#{Bundler::VERSION}

0 commit comments

Comments
 (0)