diff --git a/lib/bundler/cli/platform.rb b/lib/bundler/cli/platform.rb index e97cad49a4..068c765aad 100644 --- a/lib/bundler/cli/platform.rb +++ b/lib/bundler/cli/platform.rb @@ -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 diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb index 00d4ef2196..1763035a8a 100644 --- a/lib/bundler/env.rb +++ b/lib/bundler/env.rb @@ -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 diff --git a/spec/bundler/other/platform_spec.rb b/spec/bundler/other/platform_spec.rb index 5693d6bce6..bf38a05646 100644 --- a/spec/bundler/other/platform_spec.rb +++ b/spec/bundler/other/platform_spec.rb @@ -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}