-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel.system() exit status doesn't seem to be stored at $? #2141
Comments
h7kayama
added a commit
to h7kayama/pry
that referenced
this issue
Nov 26, 2021
h7kayama
added a commit
to h7kayama/pry
that referenced
this issue
Nov 26, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup
Expected
In a file called
system_call_exit_status.rb
, I have the following:which outputs
The example above seem to demonstrate that
system
writes the exit status to$?
, as described in documentationSimilar output can be seen by invoking
pry
on the file, i.e.I would expect
pry
REPL to behave the same.Actual
Unfortunately, the actual output from
pry
REPL seem to be different:Is this expected? I'm guessing
pry
REPL session overrides$?
on calls tosystem
, because using backticks seem to show accurate behavior, i.e.The text was updated successfully, but these errors were encountered: