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

[bundler/bundler] RUBY_ENGINE should always be defined after 1.8.7

d6c9196d18
This commit is contained in:
David Rodríguez 2019-04-12 19:05:26 +02:00 committed by Hiroshi SHIBATA
parent d2d6d5c988
commit 7255f55dba
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
6 changed files with 16 additions and 33 deletions

View file

@ -38,28 +38,27 @@ module Bundler
].freeze
def ruby?
!mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" ||
RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
!mswin? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby")
end
def mri?
!mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
!mswin? && RUBY_ENGINE == "ruby"
end
def rbx?
ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
ruby? && RUBY_ENGINE == "rbx"
end
def jruby?
defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
RUBY_ENGINE == "jruby"
end
def maglev?
defined?(RUBY_ENGINE) && RUBY_ENGINE == "maglev"
RUBY_ENGINE == "maglev"
end
def truffleruby?
defined?(RUBY_ENGINE) && RUBY_ENGINE == "truffleruby"
RUBY_ENGINE == "truffleruby"
end
def mswin?