summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2018-11-25 13:25:17 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-09 12:31:01 +0200
commit3cb89b7e5c0f39d4b481f9dc7b6c53b7bbe2e030 (patch)
tree39d8aaf8aa17526ff84a1a6ddfac1b1dbc182587 /lib/bundler
parent3b9abc8932684fa708e396621b46c55aa444c39c (diff)
downloadbundler-3cb89b7e5c0f39d4b481f9dc7b6c53b7bbe2e030.tar.gz
[CurrentRuby] Say we are ruby? when the generic local platform is Gem::Platform::RUBYsegiddins/gemspec-force-ruby-platform
This allows us to always say we're ruby? when force_ruby_platform is set, and fixes using gemspec & force_ruby_platform on windows.
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/current_ruby.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb
index 6c8ad72ee3..c132e8ecc0 100644
--- a/lib/bundler/current_ruby.rb
+++ b/lib/bundler/current_ruby.rb
@@ -38,6 +38,8 @@ module Bundler
].freeze
def ruby?
+ return true if Bundler::GemHelpers.generic_local_platform == Gem::Platform::RUBY
+
!mswin? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
end