diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-04-28 02:01:01 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-04-28 02:01:04 +0900 |
commit | cae0b73214d721539e335babf02283799198a983 (patch) | |
tree | 99c947af3704bb2a5ea005121ebfeecc8f8c12d0 | |
parent | a1b4816759418ca8fe510e8739622fc5d77ab0f0 (diff) | |
download | ruby-cae0b73214d721539e335babf02283799198a983.tar.gz |
make sync-default-gems GEM=irb
from https://github.com/ruby/irb/commit/89e9add06da3fd5f9ce91a2f5fa0b0190aa5d42f.
This adds syntax highlight support for Module on inspect.
In addition to that, I'm adding a trailing space in test_color.rb for
testing ruby-commit-hook's auto-style.
-rw-r--r-- | lib/irb/color.rb | 2 | ||||
-rw-r--r-- | test/irb/test_color.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb index 201aecac30..87f6d88ae1 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -46,7 +46,7 @@ module IRB # :nodoc: end def inspect_colorable?(obj) - if obj.is_a?(Class) && obj.name + if obj.is_a?(Module) && obj.name return true end diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb index 8a59374691..2b43b2cd32 100644 --- a/test/irb/test_color.rb +++ b/test/irb/test_color.rb @@ -55,6 +55,7 @@ module TestIRB /reg/ => true, Object.new => false, Struct => true, + Test => true, Struct.new(:a) => false, Struct.new(:a).new(1) => false, }.each do |object, result| |