1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

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

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)