mpounsett@afilias.info
2014-Jun-25 21:44 UTC
[Puppet Users] 2->3 unlisted incompatible change to array slices?
While migrating our local modules from puppet 2 to puppet 3 I think I've found a backwards-incompatible change that's not listed in the release notes. I'd like to verify that what I'm seeing is expected, and make sure I'm not missing any other side-effects of the change. In puppet 2 templates, array slices which returned a single element were still returned as an array, so a structure like this was valid: <%- myarray[-1].each do |text| -%> <%=text%> <%- end -%> In puppet 3 templates this throws an error: undefined method `each' for "foo":String at ... It looks like slices that return only a single element are now returned as the type of the array element rather than as an array. I don't see this change mentioned anywhere at <http://docs.puppetlabs.com/puppet/3/reference/release_notes.html>. Is there anything else to this change that I'm missing, or are there other side-effects to this I should be watching out for? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f8e5383f-aae3-4ce0-aa12-1a3b9fd8d162%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.