HomePhorge

(#7297) Fix Puppet::Resource#to_manifest in Ruby 1.9
809b6fe5b105Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#7297) Fix Puppet::Resource#to_manifest in Ruby 1.9

This method was relying on the implicit join in Ruby 1.8's Array#to_s, eg.
[1,2,3].to_s => "123". The behavior in Ruby 1.9 is more akin to Array#inspect,
eg. [1,2,3].to_s => "[1, 2, 3]". Since the array we were building was lines
to be printed, the latter behavior is incorrect. So we just join into a
single string, which prints consistently in all versions of Ruby.

Paired-With: Josh Cooper
Original patch by Aria Stewart <aredridel@nbtsc.org>

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU797da049bf8f: Merge branch 'ticket/2.7.x/7298' into 2.7.x
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU809b6fe5b105: (#7297) Fix Puppet::Resource#to_manifest in Ruby 1.9 (authored by Nick Lewis <nick@puppetlabs.com>).May 17 2011, 2:18 AM