Bug #12452
Puppet::Util::SELinux#read_mounts not compatible with Ruby 1.9.2p290
| Status: | Closed | Start date: | 02/06/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 2.7.12 | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ruby19 | |||
| Votes: | 0 |
Description
From Jos Backus, via email:
I just found this bug while running Puppet 2.7.10 on CentOS 6.2 during kickstart with Ruby 1.9.2p290. The error it fixes is a NoMethodError: there’s no String#collect. It doesn’t look like the result of the block is used so collect creates an unused object; each_line seems to make more sense, plus it works with Ruby 1.8.7, too.
--- selinux.rb.orig 2012-02-02 22:47:26.798249289 -0800
+++ selinux.rb 2012-02-02 22:35:09.725273057 -0800
@@ -163,7 +163,7 @@
# Read all entries in /proc/mounts. The second column is the
# mountpoint and the third column is the filesystem type.
# We skip rootfs because it is always mounted at /
- mounts.collect do |line|
+ mounts.each_line do |line|
params = line.split(' ')
next if params[2] == 'rootfs'
mntpoint[params[1]] = params[2]
History
Updated by Deepak Giridharagopal 3 months ago
- Keywords set to ruby19
Updated by Deepak Giridharagopal 3 months ago
- Status changed from Unreviewed to In Topic Branch Pending Review
- Assignee set to Deepak Giridharagopal
- Target version set to 2.7.x
Updated by Daniel Pittman 3 months ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
- Target version changed from 2.7.x to 2.7.11
Updated by Matthaus Litteken 3 months ago
- Status changed from Merged - Pending Release to Closed
- Target version changed from 2.7.11 to 2.7.12
Released in Puppet 2.7.12rc1