Project

General

Profile

Feature #5572

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

Added by ktsj (Kazuki Tsujimoto) almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-dev:44797]

Description

辻本です。

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

パッチを添付します。

Associated revisions

Revision 33792
Added by akr (Akira Tanaka) almost 6 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 akr (Akira Tanaka) almost 6 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 akr (Akira Tanaka) almost 6 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 akr (Akira Tanaka) almost 6 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 [ruby-dev:44798] Updated by ktsj (Kazuki Tsujimoto) almost 6 years ago

  • Category changed from lib to ext

#2 Updated by akr (Akira Tanaka) almost 6 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