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

regression - function regsubs should allow a hash as replacement parameter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.0.0
    • Fix Version/s: PUP 4.5.0
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Epic Link:
    • Story Points:
      1
    • Sprint:
      Language 2016-03-09
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      A regression was detected in the regsubst function in that it used to support a Hash replacement mapping, but this broke in 4.x. The functionality is now restored.

      Description

      With puppet 3.x and a ruby version newer then 1.8 it was possible to give a hash as the replacement parameter to the function regsubst. As puppet 4.x ships with ruby 2.1 it would work now generally, but the parameter validation only accepts a String as replacement parameter.

      For example the following worked with puppet 3.x and will throw an error with puppet 4.x:

      puppet apply -e 'notice(regsubst("tuto", "[uo]", { "u" => "o", "o" => "u" }, "G"))'
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vicinus Reinhard Vicinus
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support