From 9a2999982cddeb30566e6fd2a3762e9c04603075 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Mon, 4 Feb 2013 17:57:00 +0200 Subject: [PATCH] BaseHelpers: add `#jruby_19?` method And remove some naive comments. --- lib/pry/helpers/base_helpers.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pry/helpers/base_helpers.rb b/lib/pry/helpers/base_helpers.rb index 573e3a97..307910b1 100644 --- a/lib/pry/helpers/base_helpers.rb +++ b/lib/pry/helpers/base_helpers.rb @@ -83,12 +83,15 @@ class Pry defined?(Win32::Console) || ENV['ANSICON'] end - # are we on Jruby platform? def jruby? RbConfig::CONFIG['ruby_install_name'] == 'jruby' end - # are we on rbx platform? + def jruby_19? + RbConfig::CONFIG['ruby_install_name'] == 'jruby' && + RbConfig::CONFIG['ruby_version'] == '1.9' + end + def rbx? RbConfig::CONFIG['ruby_install_name'] == 'rbx' end