This project is archived and is in readonly mode.
improve the pretty printing of OrderedHash
Reported by Nobuhiro IMAI | October 11th, 2009 @ 04:44 AM
I submitted the same ticket to Rails Guides, sorry.
It seems that the pretty printing of the instance of ActiveSupport::OrderedHash is broken.
>> pp [1, 1].group_by{|i| i}
{[1, [1, 1]]=>nil}
=> nil
After patching:
>> pp [1, 1].group_by{|i| i}
#<OrderedHash {1=>[1, 1]}>
and works correctly even if the hash is larger:
>> pp (1..20).group_by{|i| i % 3}
#<OrderedHash
{1=>[1, 4, 7, 10, 13, 16, 19],
2=>[2, 5, 8, 11, 14, 17, 20],
0=>[3, 6, 9, 12, 15, 18]}>
=> nil
Thanks,
Comments and changes to this ticket
-
Rohit Arondekar October 6th, 2010 @ 06:42 AM
- State changed from “new” to “stale”
- Importance changed from “” to “”
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>