Project

General

Profile

Feature #10508

Return enumerator in TSort iterators

Added by ptico (Andrey Savchenko) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:66270]

Description

Return an Enumerator if no block is given for:

  • TSort.tsort_each
  • TSort.each_strongly_connected_component
  • TSort.each_strongly_connected_component_from

Files

Associated revisions

Revision 0eadc632
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

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

Revision 48584
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

Revision 48584
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

Revision 48584
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

Revision 48584
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

Revision 48584
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

Revision 48584
Added by akr (Akira Tanaka) almost 5 years ago

  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

History

Updated by marcandre (Marc-Andre Lafortune) almost 5 years ago

  • Assignee set to akr (Akira Tanaka)

Looks good.

Updated by nobu (Nobuyoshi Nakada) almost 5 years ago

Unnecessary Enumerator slows the performance down.

Updated by ptico (Andrey Savchenko) almost 5 years ago

If you mean these .to_a calls, i have created dummy benchmark: https://gist.github.com/Ptico/a16a5fe221de91166c31 and it looks good

Updated by akr (Akira Tanaka) almost 5 years ago

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

Applied in changeset ruby-trunk:r48584.


  • lib/tsort.rb: Returns an enumerator if no block is given. [ruby-core:66270] [Feature #10508] Proposed by Andrey Savchenko.

Also available in: Atom PDF