Project

General

Profile

Actions

Bug #5411

closed

Some enum.c doc tweaks

Added by bt (Bernd Homuth) over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
--
Backport:
[ruby-core:39972]

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.


Files

Actions #1

Updated by drbrain (Eric Hodel) over 10 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

Updated by drbrain (Eric Hodel) over 10 years ago

I improved group_by in r33417 based on your work.

Updated by bt (Bernd Homuth) over 10 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

Updated by drbrain (Eric Hodel) over 10 years ago

Yours is better, I applied it!

Actions

Also available in: Atom PDF