Skip to content

Commit

Permalink
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions truffle/src/main/ruby/core.rb
Original file line number Diff line number Diff line change
@@ -181,6 +181,7 @@ def self.omit(reason)
require_relative 'core/rubinius/common/dir_glob'
require_relative 'core/rubinius/common/file_test'
require_relative 'core/rubinius/common/stat'
require_relative 'core/rubinius/api/shims/stat'
require_relative 'core/rubinius/common/float'
require_relative 'core/rubinius/common/immediate'
#require_relative 'core/rubinius/common/location'
18 changes: 18 additions & 0 deletions truffle/src/main/ruby/core/rubinius/api/shims/stat.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

class Rubinius::Stat

# Process.groups only return supplemental groups, so we need to check if gid/egid match too.
def grpowned?
gid = gid()
return true if gid == Process.gid || gid == Process.egid
Process.groups.include?(gid)
end

end

0 comments on commit c53cd40

Please sign in to comment.