diff options
author | Danielle Sucher <dsucher@gmail.com> | 2013-09-06 06:22:34 -0700 |
---|---|---|
committer | Danielle Sucher <dsucher@gmail.com> | 2013-09-06 06:22:34 -0700 |
commit | e129dc305174f898b678a076c9b5923fe3fe164b (patch) | |
tree | 1afce0d12dbcd5aa854cdae8b1ecc3e422e05b69 /lib | |
parent | 415eae91b80bbea283876ee399b190d6be6825d6 (diff) | |
download | pry-e129dc305174f898b678a076c9b5923fe3fe164b.tar.gz |
Refactor BaseHelpers with #mri?
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pry/helpers/base_helpers.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/pry/helpers/base_helpers.rb b/lib/pry/helpers/base_helpers.rb index c07d9e01..4756df6f 100644 --- a/lib/pry/helpers/base_helpers.rb +++ b/lib/pry/helpers/base_helpers.rb @@ -88,25 +88,25 @@ class Pry end def jruby_19? - RbConfig::CONFIG['ruby_install_name'] == 'jruby' && - RbConfig::CONFIG['ruby_version'] == '1.9' + jruby? && RbConfig::CONFIG['ruby_version'] == '1.9' end def rbx? RbConfig::CONFIG['ruby_install_name'] == 'rbx' end + def mri? + RbConfig::CONFIG['ruby_install_name'] == 'ruby' + end + def mri_18? - RUBY_VERSION =~ /1.8/ && RbConfig::CONFIG['ruby_install_name'] == 'ruby' + mri? && RUBY_VERSION =~ /1.8/ end def mri_19? - RUBY_VERSION =~ /1.9/ && RbConfig::CONFIG['ruby_install_name'] == 'ruby' + mri? && RUBY_VERSION =~ /1.9/ end - def mri_20? - RUBY_VERSION =~ /2.0/ && RbConfig::CONFIG['ruby_install_name'] == 'ruby' - end # Try to use `less` for paging, if it fails then use # simple_pager. Also do not page if Pry.pager is falsey |