Fix 'ls -g' shows colored results. If Ruby is post 1.9.2 global_variables returns Array of symbol. So change them to string to compare BUILTIN_GLOBALS or PSEUDO_GLOBALS.

This commit is contained in:
yui-knk 2013-12-24 23:35:37 +09:00
parent 107c7bcb72
commit f3394b42ba
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class Pry
def format(globals)
globals.sort_by(&:downcase).map do |name|
name = name.to_s
if PSEUDO_GLOBALS.include?(name)
color(:pseudo_global, name)
elsif BUILTIN_GLOBALS.include?(name)