summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mair <jrmair@gmail.com>2011-04-24 03:46:25 +1200
committerJohn Mair <jrmair@gmail.com>2011-04-24 03:46:25 +1200
commit673ae6cd0f360aa0c57d2379536e497922c46e4e (patch)
treebf1a1b22bc512e1fa9eb1ee78ec52c557325f9e7
parent98fe7c24c3ac6727250accdd2ea9b3f9f737dc26 (diff)
downloadpry-673ae6cd0f360aa0c57d2379536e497922c46e4e.tar.gz
Another JRuby hack to prevent colors being used in 1.9 mode, due to regex bug in JRuby
-rw-r--r--lib/pry.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/pry.rb b/lib/pry.rb
index de85af60..9818adc9 100644
--- a/lib/pry.rb
+++ b/lib/pry.rb
@@ -31,3 +31,9 @@ require "#{direc}/pry/completion"
require "#{direc}/pry/core_extensions"
require "#{direc}/pry/pry_class"
require "#{direc}/pry/pry_instance"
+
+
+# TEMPORARY HACK FOR BUG IN JRUBY 1.9 REGEX (which kills CodeRay)
+if RUBY_VERSION =~ /1.9/ && RUBY_ENGINE =~ /jruby/
+ Pry.color = false
+end