Skip to content

Commit

Permalink
Fix: Process::Status#exit_code doc (#15351)
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 authored Jan 17, 2025
1 parent 0fbdcc9 commit 2b544f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/process/status.cr
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class Process::Status
# Raises `RuntimeError` if the status describes an abnormal exit.
#
# ```
# Process.run("true").exit_code # => 1
# Process.run("true").exit_code # => 0
# Process.run("exit 123", shell: true).exit_code # => 123
# Process.new("sleep", ["10"]).tap(&.terminate).wait.exit_code # RuntimeError: Abnormal exit has no exit code
# ```
Expand All @@ -258,7 +258,7 @@ class Process::Status
# Returns `nil` if the status describes an abnormal exit.
#
# ```
# Process.run("true").exit_code? # => 1
# Process.run("true").exit_code? # => 0
# Process.run("exit 123", shell: true).exit_code? # => 123
# Process.new("sleep", ["10"]).tap(&.terminate).wait.exit_code? # => nil
# ```
Expand Down

0 comments on commit 2b544f1

Please sign in to comment.