diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-11-14 10:48:48 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-14 06:09:37 +0000 |
| commit | a6fa99fe18ec3d5f416c87cdb7e7fbb22f9de612 (patch) | |
| tree | fd62569d80fb558066168c8c8231afaa91cec3ad | |
| parent | a242adc3e9de1e9124ba6a4f34d3b979afc6a671 (diff) | |
[ruby/rubygems] Removed deprecated Gem::Platform.match
https://github.com/ruby/rubygems/commit/f4b4f12f91
| -rw-r--r-- | lib/rubygems/platform.rb | 11 | ||||
| -rw-r--r-- | test/rubygems/test_gem_platform.rb | 18 |
2 files changed, 0 insertions, 29 deletions
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index f0eae47c54..367b00e7e1 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require_relative "deprecate" - ## # Available list of platforms for targeting Gem installations. # @@ -21,15 +19,6 @@ class Gem::Platform end end - def self.match(platform) - match_platforms?(platform, Gem.platforms) - end - - class << self - extend Gem::Deprecate - rubygems_deprecate :match, "Gem::Platform.match_spec? or match_gem?" - end - def self.match_platforms?(platform, platforms) platform = Gem::Platform.new(platform) unless platform.is_a?(Gem::Platform) platforms.any? do |local_platform| diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb index bb0f9ba8fd..c1ff36772b 100644 --- a/test/rubygems/test_gem_platform.rb +++ b/test/rubygems/test_gem_platform.rb @@ -11,15 +11,6 @@ class TestGemPlatform < Gem::TestCase assert_equal Gem::Platform.new(%w[x86 darwin 8]), Gem::Platform.local end - def test_self_match - Gem::Deprecate.skip_during do - assert Gem::Platform.match(nil), "nil == ruby" - assert Gem::Platform.match(Gem::Platform.local), "exact match" - assert Gem::Platform.match(Gem::Platform.local.to_s), "=~ match" - assert Gem::Platform.match(Gem::Platform::RUBY), "ruby" - end - end - def test_self_match_gem? assert Gem::Platform.match_gem?(nil, "json"), "nil == ruby" assert Gem::Platform.match_gem?(Gem::Platform.local, "json"), "exact match" @@ -502,15 +493,6 @@ class TestGemPlatform < Gem::TestCase assert_equal 1, result.scan(/@version=/).size end - def test_gem_platform_match_with_string_argument - util_set_arch "x86_64-linux-musl" - - Gem::Deprecate.skip_during do - assert(Gem::Platform.match(Gem::Platform.new("x86_64-linux")), "should match Gem::Platform") - assert(Gem::Platform.match("x86_64-linux"), "should match String platform") - end - end - def test_constants assert_equal [nil, "java", nil], Gem::Platform::JAVA.to_a assert_equal ["x86", "mswin32", nil], Gem::Platform::MSWIN.to_a |
