Feature #5572

ブロックなしPathname#find呼び出しでEnumeratorを返す

Added by Kazuki Tsujimoto almost 4 years ago. Updated almost 4 years ago.

[ruby-dev:44797]
Status:Closed
Priority:Normal
Assignee:Akira Tanaka

Description

辻本です。

Pathname#findをブロックなしで呼び出すとno block givenエラーとなりますが、
Find.findと同様にこの場合はEnumeratorを返すようにすることを提案します。

パッチを添付します。

0001-lib-pathname.rb-Pathname-find-return-an-enumerator-i.patch Magnifier (2.93 KB) Kazuki Tsujimoto, 11/05/2011 02:01 PM


Related issues

Related to Backport193 - Backport #6798: Pathname#find does not return an enumerator Rejected 07/27/2012

Associated revisions

Revision 33792
Added by Akira Tanaka almost 4 years ago

  • lib/pathname.rb (Pathname#find): return an enumerator if
    no block is given.

  • test/pathname/test_pathname.rb: add tests for above.

[Feature #5572]

Revision 33792
Added by Akira Tanaka almost 4 years ago

  • lib/pathname.rb (Pathname#find): return an enumerator if
    no block is given.

  • test/pathname/test_pathname.rb: add tests for above.

[Feature #5572]

History

#1 Updated by Kazuki Tsujimoto almost 4 years ago

  • Category changed from lib to ext

#2 Updated by Akira Tanaka almost 4 years ago

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

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


  • lib/pathname.rb (Pathname#find): return an enumerator if
    no block is given.

  • test/pathname/test_pathname.rb: add tests for above.

[Feature #5572]

Also available in: Atom PDF