Skip to content

Commit 65b0d76

Browse files
committed
[GR-20446] Implement Process.last_status.
PullRequest: truffleruby/1278
2 parents 950d6dd + ab6ec3f commit 65b0d76

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
fails:Process#last_status returns the status of the last executed child process in the current thread
2-
fails:Process#last_status returns nil if no child process has been ever executed in the current thread
3-
fails:Process#last_status raises an ArgumentError if any arguments are provided

src/main/ruby/truffleruby/core/process.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,10 @@ def self.initgroups(username, gid)
567567
Process.groups
568568
end
569569

570+
def self.last_status
571+
$?
572+
end
573+
570574
#
571575
# Wait for the given process to exit.
572576
#

0 commit comments

Comments
 (0)