mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Class instance should be also colorable on IRB
inspect. Change is made with: `$ make -C .ruby sync-default-gems GEM=irb`
This commit is contained in:
parent
52cfb17086
commit
6669c966d2
2 changed files with 2 additions and 1 deletions
|
@ -51,7 +51,7 @@ module IRB # :nodoc:
|
|||
obj.all? { |k, v| inspect_colorable?(k) && inspect_colorable?(v) }
|
||||
when Array
|
||||
obj.all? { |o| inspect_colorable?(o) }
|
||||
when String, Symbol, Regexp, Integer, Float, FalseClass, TrueClass, NilClass
|
||||
when String, Symbol, Regexp, Integer, Float, FalseClass, TrueClass, NilClass, Class
|
||||
true
|
||||
else
|
||||
false
|
||||
|
|
|
@ -53,6 +53,7 @@ module TestIRB
|
|||
['foo', :bar] => true,
|
||||
{ a: 4 } => true,
|
||||
/reg/ => true,
|
||||
Struct => true,
|
||||
Object.new => false,
|
||||
Struct.new(:a) => false,
|
||||
Struct.new(:a).new(1) => false,
|
||||
|
|
Loading…
Reference in a new issue