summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-08 16:45:35 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-08 16:45:35 +0200
commit83e93785a0e9ecb553b90e383307c9bbeeba268e (patch)
tree77a2d97ab1c91d35ea8c175e80a56720de85ebcb
parentc0c898b79db48c09158bcc9c335de66b55b5061c (diff)
downloadbundler-83e93785a0e9ecb553b90e383307c9bbeeba268e.tar.gz
Cleanup more stuff only needed for old rubies
-rw-r--r--doc/contributing/BUG_TRIAGE.md2
-rw-r--r--lib/bundler/compact_index_client/updater.rb6
-rw-r--r--lib/bundler/version.rb5
-rw-r--r--lib/bundler/yaml_serializer.rb1
-rw-r--r--spec/install/gemfile/platform_spec.rb3
-rw-r--r--spec/support/artifice/compact_index.rb6
6 files changed, 5 insertions, 18 deletions
diff --git a/doc/contributing/BUG_TRIAGE.md b/doc/contributing/BUG_TRIAGE.md
index 69aa3df0fd..fab584c7be 100644
--- a/doc/contributing/BUG_TRIAGE.md
+++ b/doc/contributing/BUG_TRIAGE.md
@@ -14,7 +14,7 @@ When you're looking at a ticket, here are the main questions to ask:
* Are the steps to reproduce the bug clearly documented in the ticket?
* Which versions of Bundler (1.1.x, 1.2.x, git, etc.) manifest this bug?
* Which operating systems (OS X, Windows, Ubuntu, CentOS, etc.) manifest this bug?
- * Which rubies (MRI, JRuby, Rubinius, etc.) and which versions (1.8.7, 1.9.3, etc.) have this bug?
+ * Which rubies (MRI, JRuby, Rubinius, etc.) and which versions (2.5, 2.6, etc.) have this bug?
Strategies for triaging a ticket:
* Be sure to ask the user to output the entirety of their `bundle env`. Sometimes users forget to post all of their `bundle env` output in the issue.
diff --git a/lib/bundler/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb
index 4d6eb80044..d77285072c 100644
--- a/lib/bundler/compact_index_client/updater.rb
+++ b/lib/bundler/compact_index_client/updater.rb
@@ -95,11 +95,7 @@ module Bundler
end
def slice_body(body, range)
- if body.respond_to?(:byteslice)
- body.byteslice(range)
- else # pre-1.9.3
- body.unpack("@#{range.first}a#{range.end + 1}").first
- end
+ body.byteslice(range)
end
def checksum_for_file(path)
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index ba6312a5cd..cfd6300950 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -1,13 +1,10 @@
# frozen_string_literal: false
-# Ruby 1.9.3 and old RubyGems don't play nice with frozen version strings
-# rubocop:disable MutableConstant
-
module Bundler
# We're doing this because we might write tests that deal
# with other versions of bundler and we are unsure how to
# handle this better.
- VERSION = "2.1.0.pre.1" unless defined?(::Bundler::VERSION)
+ VERSION = "2.1.0.pre.1".freeze unless defined?(::Bundler::VERSION)
def self.overwrite_loaded_gem_version
begin
diff --git a/lib/bundler/yaml_serializer.rb b/lib/bundler/yaml_serializer.rb
index c9ab5a4907..374b3bb5e3 100644
--- a/lib/bundler/yaml_serializer.rb
+++ b/lib/bundler/yaml_serializer.rb
@@ -40,7 +40,6 @@ module Bundler
(.+) # key
(?::(?=(?:\s|$))) # : (without the lookahead the #key includes this when : is present in value)
[ ]?
- (?: !\s)? # optional exclamation mark found with ruby 1.9.3
(['"]?) # optional opening quote
(.*) # value
\3 # matching closing quote
diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb
index 1c7dcb2ec2..7757a3c7c4 100644
--- a/spec/install/gemfile/platform_spec.rb
+++ b/spec/install/gemfile/platform_spec.rb
@@ -265,8 +265,7 @@ RSpec.describe "bundle install across platforms" do
bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
- new_version = Gem::ConfigMap[:ruby_version] == "1.8" ? "1.9.1" : "1.8"
- FileUtils.mv(vendored_gems, bundled_app("vendor/bundle", Gem.ruby_engine, new_version))
+ FileUtils.mv(vendored_gems, bundled_app("vendor/bundle", Gem.ruby_engine, "1.8"))
bundle! :install
expect(vendored_gems("gems/rack-1.0.0")).to exist
diff --git a/spec/support/artifice/compact_index.rb b/spec/support/artifice/compact_index.rb
index f97c2b3fbc..4f01690ae4 100644
--- a/spec/support/artifice/compact_index.rb
+++ b/spec/support/artifice/compact_index.rb
@@ -57,11 +57,7 @@ class CompactIndexAPI < Endpoint
end
def slice_body(body, range)
- if body.respond_to?(:byteslice)
- body.byteslice(range)
- else # pre-1.9.3
- body.unpack("@#{range.first}a#{range.end + 1}").first
- end
+ body.byteslice(range)
end
def gems(gem_repo = GEM_REPO)