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

Don't override/monkey patch `String` class #419

Closed n-rodriguez closed 1 year ago

n-rodriguez commented 2 years ago

This is pretty unexpected : https://github.com/awesome-print/awesome_print/blob/master/lib/awesome_print/core_ext/string.rb

Defining those methods here https://github.com/awesome-print/awesome_print/blob/master/lib/awesome_print/colorize.rb with a string argument would be cleaner.

zw963 commented 2 years ago

Yes, i notice, ap auto require awesome_print/core_ext/string.rb

if make String#instance_methods more confusing ...

zw963 commented 2 years ago

Maybe we should add a config option to permit disable it.

n-rodriguez commented 1 year ago

Maybe we should add a config option to permit disable it.

or implement it properly : https://github.com/awesome-print/awesome_print/pull/421