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

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.4.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2016-02-24
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      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

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support