awesome-print / awesome_print

Pretty print your Ruby objects with style -- in full color and with proper indentation
http://github.com/michaeldv/awesome_print
MIT License
4.07k stars 454 forks source link

awesome_print/core_ext/grep.rb breaks origial Array#grep #119

Closed yuroyoro closed 9 years ago

yuroyoro commented 11 years ago

I tried on awesome_print 1.1.0 and ruby 1.8.7-p334.

irb(main):001:0> [{:a => "http:\\/\\/"}].grep(Hash){|x| puts x ; true }
ahttp:\/\/
=> [true]
irb(main):002:0> require 'awesome_print'
=> true
irb(main):003:0> [{:a => "http:\\/\\/"}].grep(Hash){|x| puts x ; true }
SyntaxError: compile error
(irb):3: syntax error, unexpected $undefined, expecting $end
%Q/ahttp:\\/\\// =~ Hash
             ^
        from (irb):3
        from (irb):3
irb(main):004:0>