On 10/11/09 21:19, Markus Roberts wrote: > +1 > > As a by-the-way, you could also write this: > > + code = [code] unless code.is_a?(Array) > code.each do |stmt| > > as: > > - code.each do |stmt| > + [code].flatten.each do |stmt|
I longly hesitated but finally preferred the first version because flatten acts recursively on the array which might not be what I wanted (honestly I don't really remember). > And finally, I'm very sorry for dropping the stray remark that hijacked the > thread. T'wasn't my intent. Absolutely no problem, it's just nobody cared anymore about my patch, so I felt it was necessary to resurrect it :-D -- Brice Figureau My Blog: http://www.masterzen.fr/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
