Bug #5411

Some enum.c doc tweaks

Added by Bernd Homuth almost 4 years ago. Updated over 3 years ago.

[ruby-core:39972]
Status:Closed
Priority:Normal
Assignee:Eric Hodel
ruby -v:-- Backport:

Description

I tried to fix some of the method descriptions and made. Please check group_by if this is any better than the original version. I had trouble finding a concise description.

Thanks for reviewing.

0001-enum.c-method-description-tweaks.patch Magnifier - enum.c patch (5.81 KB) Bernd Homuth, 10/06/2011 07:07 AM

0001-change-Enumerable-group_by-description.patch Magnifier (1.08 KB) Bernd Homuth, 10/06/2011 09:26 PM

Associated revisions

Revision 33416
Added by Eric Hodel almost 4 years ago

  • enum.c: Clean up wording in Enumerable documentation. Patch by b t. [Ruby 1.9 - Bug #5411

Revision 33416
Added by Eric Hodel almost 4 years ago

  • enum.c: Clean up wording in Enumerable documentation. Patch by b t. [Ruby 1.9 - Bug #5411

Revision 33429
Added by Eric Hodel almost 4 years ago

  • enum.c (group_by): Improve group_by description. Patch by b t. [#5411]

Revision 33429
Added by Eric Hodel almost 4 years ago

  • enum.c (group_by): Improve group_by description. Patch by b t. [#5411]

History

#1 Updated by Eric Hodel almost 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33416.
b, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • enum.c: Clean up wording in Enumerable documentation. Patch by b t. [Ruby 1.9 - Bug #5411

#2 Updated by Eric Hodel almost 4 years ago

I improved group_by in r33417 based on your work.

#3 Updated by Bernd Homuth almost 4 years ago

I find the new group_by more confusing now and changed it to this:

  • Groups the collection by result of the block. Returns a hash where the
  • keys are the evaluated result from the block and the values are
  • arrays of elements in the collection that correspond to the key. *
  • If no block is given an enumerator is returned. *
  • (1..6).group_by { |i| i%3 } #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}

Do you agree. I mean it's still not perfect but that double value sentence didn't make sense to me.

Thank you for reviewing

#4 Updated by Eric Hodel almost 4 years ago

Yours is better, I applied it!

#5 Updated by Bernd Homuth over 3 years ago

[removed]

Also available in: Atom PDF