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

2 README Examples Don't Work #326

Closed tonytino closed 3 years ago

tonytino commented 6 years ago
$ cat 7.rb # Should be cat > 7.rb
require "awesome_print"
some_array = (1..1000).to_a
ap some_array, :limit => true
^D
$ ruby 7.rb
[
    [  0] 1,
    [  1] 2,
    [  2] 3,
    [  3] .. [996],
    [997] 998,
    [998] 999,
    [999] 1000
]

$ cat 8.rb # Should be cat > 8.rb
require "awesome_print"
some_array = (1..1000).to_a
ap some_array, :limit => 5
^D
$ ruby 8.rb
[
    [  0] 1,
    [  1] 2,
    [  2] .. [997],
    [998] 999,
    [999] 1000
]

Really enjoying the gem! The documentation is wonderful, and I really love these examples, but I noticed the last two don't work because of the same typo. I've noted the typo via comments above.

BryanH commented 3 years ago

Good catch! I'll fix it