1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Use Gem::Platform.local instead of RUBY_PLATFORM

In certain places, we want to display the platform name with
`Gem::Platform.local` instead of `RUBY_PLATFORM`.

Fixes https://github.com/rubygems/rubygems/issues/5264

https://github.com/rubygems/rubygems/commit/bdd1848ae8
This commit is contained in:
Ngan Pham 2022-01-24 21:01:21 -08:00 committed by git
parent b07879e553
commit 42ef3fcaef
3 changed files with 6 additions and 6 deletions

View file

@ -23,7 +23,7 @@ module Bundler
output << "No ruby version specified"
end
else
output << "Your platform is: #{RUBY_PLATFORM}"
output << "Your platform is: #{Gem::Platform.local}"
output << "Your app has gems that work on these platforms:\n#{platforms.join("\n")}"
if ruby_version

View file

@ -71,7 +71,7 @@ module Bundler
def self.ruby_version
str = String.new(RUBY_VERSION)
str << "p#{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{RUBY_PLATFORM}]"
str << " (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION}) [#{Gem::Platform.local}]"
end
def self.git_version

View file

@ -17,7 +17,7 @@ RSpec.describe "bundle platform" do
bundle "platform"
expect(out).to eq(<<-G.chomp)
Your platform is: #{RUBY_PLATFORM}
Your platform is: #{Gem::Platform.local}
Your app has gems that work on these platforms:
#{bundle_platform_platforms_string}
@ -40,7 +40,7 @@ G
bundle "platform"
expect(out).to eq(<<-G.chomp)
Your platform is: #{RUBY_PLATFORM}
Your platform is: #{Gem::Platform.local}
Your app has gems that work on these platforms:
#{bundle_platform_platforms_string}
@ -61,7 +61,7 @@ G
bundle "platform"
expect(out).to eq(<<-G.chomp)
Your platform is: #{RUBY_PLATFORM}
Your platform is: #{Gem::Platform.local}
Your app has gems that work on these platforms:
#{bundle_platform_platforms_string}
@ -81,7 +81,7 @@ G
bundle "platform"
expect(out).to eq(<<-G.chomp)
Your platform is: #{RUBY_PLATFORM}
Your platform is: #{Gem::Platform.local}
Your app has gems that work on these platforms:
#{bundle_platform_platforms_string}