summaryrefslogtreecommitdiff
path: root/test/dtrace/helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dtrace/helper.rb')
-rw-r--r--test/dtrace/helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dtrace/helper.rb b/test/dtrace/helper.rb
index 7683a6a887..ce730800b4 100644
--- a/test/dtrace/helper.rb
+++ b/test/dtrace/helper.rb
@@ -19,7 +19,7 @@ if RUBY_PLATFORM =~ /linux/
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