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

parameter defaults of false and {} does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
    • Template:

      Description

      In a type I have:

      newparam(:arguments) do
         desc "The arguments to send to the action"
        
         defaultto {}
      end
      

      If I do not set the property and check in my provider the value would be nil instead of {}. If instead of defaulting to {} I default to [] then the correct empty array gets to the provider.

      Similarly defaulting to false ends up being a nil.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kylo Kylo Ginsberg
              Reporter:
              redmine.exporter redmine.exporter
              QA Contact:
              Narmadha Perumal Narmadha Perumal
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support