ruby-changes:58139
From: Yusuke <ko1@a...>
Date: Sun, 6 Oct 2019 15:23:16 +0900 (JST)
Subject: [ruby-changes:58139] 6525d3bcc7 (master): test/dtrace/helper.rb: Etc.getgrnam may return nil on some platforms
https://git.ruby-lang.org/ruby.git/commit/?id=6525d3bcc7 From 6525d3bcc7d0be65e2ff97d6785d9f36b5e4988a Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sun, 6 Oct 2019 15:22:12 +0900 Subject: test/dtrace/helper.rb: Etc.getgrnam may return nil on some platforms diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb index 7683a6a..ce73080 100644 --- a/test/dtrace/helper.rb +++ b/test/dtrace/helper.rb @@ -19,7 +19,7 @@ if RUBY_PLATFORM =~ /linux/ https://github.com/ruby/ruby/blob/trunk/test/dtrace/helper.rb#L19 impl = :stap begin require 'etc' - ok = (%w[stapusr stapdev].map {|g|Etc.getgrnam(g).gid} & Process.groups).size == 2 + ok = (%w[stapusr stapdev].map {|g|(Etc.getgrnam(g) || raise(ArgumentError)).gid} & Process.groups).size == 2 rescue LoadError, ArgumentError end unless ok end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/