diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fileutils.rb | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -63,6 +63,11 @@ Fri Mar 13 09:30:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * bignum.c (bigfixize): zero length Bignum is 0. +Fri Mar 13 09:17:12 2009 Yukihiro Matsumoto <matz@ruby-lang.org> + + * lib/fileutils.rb (FileUtils#fu_get_gid): stringify group + argument before making regexp match. [ruby-dev:38155] + Fri Mar 13 08:06:48 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * util.c (rv_strdup): macro to duplicate nul-terminated string. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index f2302703be..6124f29894 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -987,6 +987,7 @@ module FileUtils def fu_get_gid(group) #:nodoc: return nil unless group + group = group.to_s if /\A\d+\z/ =~ group then group.to_i else Etc.getgrnam(group).gid |