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

Fix `&Proc.new` deprecation warnings #381

Closed askhat closed 4 years ago

askhat commented 4 years ago

According to https://github.com/ruby/ruby/commit/9f1fb0a17febc59356d58cef5e98db61a3c03550, &Proc.new with no block in args has been deprecated since 2.7.0. I updated couple files adding &block argument and replacing &Proc.new with &block, so the console doesn't flood with warnings. Original warnings:

.../lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
.../lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
askhat commented 4 years ago

Tests are seemingly failing due sqlite3 or something. Probably easy to fix, however do we really need sqlite3 to verify this?

askhat commented 4 years ago

Just noticed that there is whole bunch of similar PRs. So, I'm closing this one and moving to amazing_print.