summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0xAB <0xAB@protonmail.com>2017-09-01 14:37:09 +0100
committer0xAB <0xAB@protonmail.com>2017-09-01 14:37:09 +0100
commita54a5c76bd7108469c77ce6b66e5b3b43deacf1d (patch)
treec40bdf9c73ade181f8549cd44cba6ffc6a94ee1f
parent0f92ffc57cb699f90ae3667932a6976229c5e45b (diff)
downloadpry-a54a5c76bd7108469c77ce6b66e5b3b43deacf1d.tar.gz
only fallback on Pry.color if "_pry_" is not in scope
-rw-r--r--lib/pry/helpers/colors.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pry/helpers/colors.rb b/lib/pry/helpers/colors.rb
index de5c2faf..b1c7967b 100644
--- a/lib/pry/helpers/colors.rb
+++ b/lib/pry/helpers/colors.rb
@@ -14,7 +14,7 @@ module Pry::Helpers::Colors
}
color_enabled = lambda do |pry|
- (pry and pry.color) or (defined?(_pry_) and _pry_.color) or Pry.color
+ (pry and pry.color) or (defined?(_pry_) ? _pry_.color : Pry.color)
end
COLORS.each_pair do |color, value|