Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5837

reverse_each and step functions should return undef when given a block to avoid confusion

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.4.0
    • None
    • None
    • 1
    • Language 2016-02-24
    • Not Needed
    • this is a fix for a feature that is new in this release.

    Description

      In this example it is surprising that the original value is produced and chained to map:

      notice [1,2,3,4].step(2)|$x|{ /* irrelevant what happens here*/ }.map |$x| {$x}
      

      I expect it to notice [1,3]
      Instead it notices [1,2,3,4]

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henrik.lindberg Henrik Lindberg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support