Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2efa00133fae
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7029b006cc9d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 3, 2014

  1. Copy the full SHA
    be98526 View commit details

Commits on Nov 4, 2014

  1. Merge pull request #2082 from cheald/process_groups

    Implement Process#groups for non-Windows machines
    headius committed Nov 4, 2014
    Copy the full SHA
    7029b00 View commit details
Showing with 10 additions and 1 deletion.
  1. +10 −1 core/src/main/java/org/jruby/RubyProcess.java
11 changes: 10 additions & 1 deletion core/src/main/java/org/jruby/RubyProcess.java
Original file line number Diff line number Diff line change
@@ -573,7 +573,16 @@ public static IRubyObject exit_bang(IRubyObject recv, IRubyObject[] args) {

@JRubyMethod(name = "groups", module = true, visibility = PRIVATE)
public static IRubyObject groups(IRubyObject recv) {
throw recv.getRuntime().newNotImplementedError("Process#groups not yet implemented");
if(Platform.IS_WINDOWS) {
throw recv.getRuntime().newNotImplementedError("groups() function is unimplemented on this machine");
} else {
long[] groups = (new com.sun.security.auth.module.UnixSystem()).getGroups();
RubyArray ary = RubyArray.newArray(recv.getRuntime(), groups.length);
for(int i = 0; i < groups.length; i++) {
ary.push(RubyFixnum.newFixnum(recv.getRuntime(), groups[i]));
}
return ary;
}
}

@JRubyMethod(name = "setrlimit", rest = true, module = true, visibility = PRIVATE)