summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2020-07-23 15:11:24 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-31 21:07:19 +0900
commit561576367beeb1237a3821db1b0ab9ef66e9fb56 (patch)
tree40e069b75137580ac75bfe721bf72b485e04499d /test/rubygems
parent1a935606b5e307375ce9d4215a46da2ca91dc1d6 (diff)
[rubygems/rubygems] Deduplicate the requirement operators in memory
https://github.com/rubygems/rubygems/commit/9963d33cf2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3379
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_requirement.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_requirement.rb b/test/rubygems/test_gem_requirement.rb
index 55a902dc83..af9d807701 100644
--- a/test/rubygems/test_gem_requirement.rb
+++ b/test/rubygems/test_gem_requirement.rb
@@ -81,6 +81,12 @@ class TestGemRequirement < Gem::TestCase
Gem::Requirement.parse(Gem::Version.new('2'))
end
+ if RUBY_VERSION >= '2.5'
+ def test_parse_deduplication
+ assert_same '~>', Gem::Requirement.parse('~> 1').first
+ end
+ end
+
def test_parse_bad
[
nil,