Project

General

Profile

Bug #5425

Improves Array's uniq/uniq! example

Added by alvaropereyra (Alvaro Pereyra Rabanal) almost 8 years ago. Updated almost 8 years ago.

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

Description

Updates examples on uniq and uniq! with a more cleaner case. Changes wording to refer a block is possible.


Files

Associated revisions

Revision 48cbe202
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 33453
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

Revision 33453
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

Revision 33453
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

Revision 33453
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

Revision 33453
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

Revision 33453
Added by drbrain (Eric Hodel) almost 8 years ago

  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

History

Updated by Eregon (Benoit Daloze) almost 8 years ago

There is a typo in the example for uniq:
b.uniq!{ ...

Also, the added description how to pass a block should be the same in uniq and uniq! (I prefer the one of uniq!).

Thanks for documenting in sentences this behavior.

Updated by alvaropereyra (Alvaro Pereyra Rabanal) almost 8 years ago

Thanks Benoit. I've fixed that typo and used the same explanation for both uniq and uniq!. Also made some other changes to other sections on the Array.

Updated by drbrain (Eric Hodel) almost 8 years ago

Please watch for trailing whitespace in your patches.

#4

Updated by drbrain (Eric Hodel) almost 8 years ago

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

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


  • array.c (rb_ary_initialize): Improve explanation of Array.new parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
  • array.c (rb_ary_s_try_convert): Fix typo (try => tries)
  • array.c (rb_ary_rindex): Add spacing for block.
  • array.c (rb_ary_uniq_bang): Describe block
  • array.c (rb_ary_uniq): ditto

Updated by alvaropereyra (Alvaro Pereyra Rabanal) almost 8 years ago

Eric Hodel wrote:

Please watch for trailing whitespace in your patches.

Will do. Sorry for that. The idea is to ease your work, not burden it :P.

Also available in: Atom PDF