Fix undefined method: inject for String #20

Merged
merged 1 commit into from Jan 18, 2013

Conversation

Projects
None yet
2 participants
Contributor

robbat2 commented Jan 11, 2013

The physical_volumes extraction using inject function doesn't work.
Change to using split/grep/map.

/Stage[main]/Releng::Disks/Volume_groupvg: Could not evaluate: undefined method `inject' for " PV,VG\n/dev/sda4,vg\n":String

Signed-off-by: Robin H. Johnson robbat2@gentoo.org

@robbat2 robbat2 Fix undefined method: inject for String
The physical_volumes extraction using inject function doesn't work.
Change to using split/grep/map.

/Stage[main]/Releng::Disks/Volume_group[vg] (err): Could not evaluate: undefined method `inject' for "  PV,VG\n/dev/sda4,vg\n":String

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
95cecec
Member

adrienthebo commented Jan 18, 2013

For clarification, this fix is necessary because Ruby 1.9 removed String#inject. I've checked it and it looks good.

@adrienthebo adrienthebo added a commit that referenced this pull request Jan 18, 2013

@adrienthebo adrienthebo Merge pull request #20 from gentoo/master
Fix undefined method: inject for String
b831542

@adrienthebo adrienthebo merged commit b831542 into puppetlabs:master Jan 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment