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

Undocumented hash lookup change with future evaluator in Puppet 3.5.0

    Details

    • Template:

      Description

      Consider this code:

      $h = { "k1" => "value" }
      $v = $h["k2"]
      

      Puppet 3.5.0 sets $v to undef. Earlier versions set $v to the empty string, I believe. (Possibly that isn't true. Possibly it is instead some comparison changes that bites me.)

      What happens when you look up a non-existing key in a hash should be documented on http://docs.puppetlabs.com/puppet/latest/reference/lang_datatypes.html#hashes.

      If I'm correct, and this was a change in behavior in Puppet 3.5.0, it should be mentioned in the release note.

        Attachments

          Activity

            People

            • Assignee:
              henrik.lindberg Henrik Lindberg
              Reporter:
              ceder Per Cederqvist
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support