Project

General

Profile

Actions

Feature #10508

closed

Return enumerator in TSort iterators

Feature #10508: Return enumerator in TSort iterators

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

Status:
Closed
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

Updated by marcandre (Marc-Andre Lafortune) almost 11 years ago Actions #1 [ruby-core:66273]

  • Assignee set to akr (Akira Tanaka)

Looks good.

Updated by nobu (Nobuyoshi Nakada) almost 11 years ago Actions #2 [ruby-core:66275]

Unnecessary Enumerator slows the performance down.

Updated by ptico (Andrey Savchenko) almost 11 years ago Actions #3 [ruby-core:66281]

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 11 years ago Actions #4 [ruby-core:66482]

  • 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.

Updated by hsbt (Hiroshi SHIBATA) almost 4 years ago Actions #5

  • Project changed from 14 to Ruby
  • Target version deleted (Ruby 2.2.0)
Actions

Also available in: PDF Atom