pp
pp copied to clipboard
Provides a PrettyPrinter for Ruby objects
See https://github.com/ruby/pp/actions/runs/7489634039/job/20386628987 ``` =============================================================================== Failure: test_lasgn_literal(PPTestModule::PPAbstractSyntaxTree) /home/runner/work/pp/pp/test/test_pp.rb:235:in `test_lasgn_literal' 232: def test_lasgn_literal 233: ast = AST.parse("_=1") 234: expected = "(SCOPE@1:0-1:3 tbl: [:_] args: nil body: (LASGN@1:0-1:3 :_ (LIT@1:2-1:3 1)))" => 235:...
This is not so much an issue as a plea for help. I upgraded to ruby 3.2.2 and pp no longer works. Has anyone reported something like this before or...
New hash syntax was introduced in ruby 1.9 around 2009 (14 years ago?) this patch will use new syntax when possible and add spaces around `=>` What do you think...
When investigating https://github.com/ruby/irb/issues/540, I found that `pp` doesn't support `BasicObject`. Consider we start supporting it in tools like `irb` or `debug`, I think it may be good for `pp` to...
Currently if you pp a more complex object such as: #true, :use_this_connective_token=>"-", :wrap_result=>true, :shall_we_display_the_md5sum=>false, :try_to_truncate_too_long_output=>true, :replace_plus_with_long_name=>false, :report_how_many_programs_are_registered=>false}, It becomes quite hard to read the output. Would it be useful to...
Right now attempting to pretty print a BasicObject or any other object lacking a few core Object methods will result in an error ``` Error: test_basic_object(PPTestModule::PPInspectTest): NoMethodError: undefined method `is_a?'...
pp is great. Sometimes you have a large datastructure, a hash, and it is hard to see which entries belong where to. For instance I had: :files=> "/home/x/data/personal_2_bis_6.pdf", "/home/x/data/personal2010_Scan.pdf", "/home/x/data/personalfoo_8.pdf"],...
Hey there! I come across this weird bug(?) when I was trying to inspect an object in `irb`. Since irb uses `pp` to print the objects I'm opening this issue...
> Also 2.7 is EOL for 2.5 years, I think such warnings or minor inconveniences are OK, and it would only affect 2.7 users keeping `pp` updated. So maybe it...
Just an idea for #25.