summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/posix.rb
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-02-26 11:43:39 +1100
committerJames Turnbull <james@lovedthanlost.net>2009-02-26 11:43:39 +1100
commit5f73eb553fd083b558fb9553b0c07b6019d0ccee (patch)
tree123ef2a9c7b8aa4e1cd52e6b98d0b3c53d626de6 /lib/puppet/util/posix.rb
parente40aea3c655e698d26c29370227b52c489e6db2b (diff)
downloadpuppet-5f73eb553fd083b558fb9553b0c07b6019d0ccee.tar.gz
puppet-5f73eb553fd083b558fb9553b0c07b6019d0ccee.tar.xz
puppet-5f73eb553fd083b558fb9553b0c07b6019d0ccee.zip
Fixed #1849 - Ruby 1.9 portability: `when' doesn't like colons, replace with semicolons
Diffstat (limited to 'lib/puppet/util/posix.rb')
-rwxr-xr-xlib/puppet/util/posix.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/puppet/util/posix.rb b/lib/puppet/util/posix.rb
index 3f6c1f6e3..40a175eb3 100755
--- a/lib/puppet/util/posix.rb
+++ b/lib/puppet/util/posix.rb
@@ -52,8 +52,8 @@ module Puppet::Util::POSIX
# Apparently the group/passwd methods need to get reset; if we skip
# this call, then new users aren't found.
case type
- when :passwd: Etc.send(:endpwent)
- when :group: Etc.send(:endgrent)
+ when :passwd; Etc.send(:endpwent)
+ when :group; Etc.send(:endgrent)
end
return nil
end
@@ -61,8 +61,8 @@ module Puppet::Util::POSIX
# Determine what the field name is for users and groups.
def idfield(space)
case Puppet::Util.symbolize(space)
- when :gr, :group: return :gid
- when :pw, :user, :passwd: return :uid
+ when :gr, :group; return :gid
+ when :pw, :user, :passwd; return :uid
else
raise ArgumentError.new("Can only handle users and groups")
end
@@ -71,8 +71,8 @@ module Puppet::Util::POSIX
# Determine what the method is to get users and groups by id
def methodbyid(space)
case Puppet::Util.symbolize(space)
- when :gr, :group: return :getgrgid
- when :pw, :user, :passwd: return :getpwuid
+ when :gr, :group; return :getgrgid
+ when :pw, :user, :passwd; return :getpwuid
else
raise ArgumentError.new("Can only handle users and groups")
end
@@ -81,8 +81,8 @@ module Puppet::Util::POSIX
# Determine what the method is to get users and groups by name
def methodbyname(space)
case Puppet::Util.symbolize(space)
- when :gr, :group: return :getgrnam
- when :pw, :user, :passwd: return :getpwnam
+ when :gr, :group; return :getgrnam
+ when :pw, :user, :passwd; return :getpwnam
else
raise ArgumentError.new("Can only handle users and groups")
end