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:
parent
107c7bcb72
commit
f3394b42ba
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue