This blog is part of our Ruby 2.5 series.
Ruby 2.5.0-preview1 was recently released.
Ruby allows pretty printing of objects using pp method.
Before Ruby 2.5, we had to require PP explicitly before using it. Even the official documentation states that “All examples assume you have loaded the PP class with require ‘pp’”.
In Ruby 2.5, we don’t need to require pp. It gets required by default. We can use it directly.
This feature was added after Ruby 2.5.0 preview 1 was released, so it’s not present in the preview. It’s present in Ruby trunk.