module Pry::Helpers::Platform
def self.jruby?
-
(Boolean)
-
def self.jruby? RbConfig::CONFIG['ruby_install_name'] == 'jruby' end
def self.jruby_19?
-
(Boolean)
-
def self.jruby_19? jruby? && RbConfig::CONFIG['ruby_version'] == '1.9' end
def self.linux?
-
(Boolean)
-
def self.linux? !!(RbConfig::CONFIG['host_os'] =~ /linux/i) end
def self.mac_osx?
-
(Boolean)
-
def self.mac_osx? !!(RbConfig::CONFIG['host_os'] =~ /\Adarwin/i) end
def self.mri?
-
(Boolean)
-
def self.mri? RbConfig::CONFIG['ruby_install_name'] == 'ruby' end
def self.mri_2?
-
(Boolean)
-
def self.mri_2? mri? && RUBY_VERSION.start_with?('2') end
def self.windows?
-
(Boolean)
- true when Pry is running on Windows with ANSI support,
def self.windows? !!(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/) end
def self.windows_ansi?
-
(Boolean)
-
def self.windows_ansi? return false unless windows? !!(defined?(Win32::Console) || Pry::Env['ANSICON'] || mri?) end