Skip to content

Commit

Permalink
make sync-default-gems GEM=irb
Browse files Browse the repository at this point in the history
from ruby/irb@89e9add.

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.
  • Loading branch information
k0kubun committed Apr 27, 2019
1 parent a1b4816 commit cae0b73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/color.rb
Expand Up @@ -46,7 +46,7 @@ def colorable?
end

def inspect_colorable?(obj)
if obj.is_a?(Class) && obj.name
if obj.is_a?(Module) && obj.name
return true
end

Expand Down
1 change: 1 addition & 0 deletions test/irb/test_color.rb
Expand Up @@ -55,6 +55,7 @@ def test_inspect_colorable
/reg/ => true,
Object.new => false,
Struct => true,
Test => true,
Struct.new(:a) => false,
Struct.new(:a).new(1) => false,
}.each do |object, result|
Expand Down

0 comments on commit cae0b73

Please sign in to comment.