What does the $?
Ruby operator mean?
I know that it is used for system calls and can be used to tell if a system call was successful.
I tried searching for documentation but couldn't find it.
What does the $?
Ruby operator mean?
I know that it is used for system calls and can be used to tell if a system call was successful.
I tried searching for documentation but couldn't find it.
There is no $
operator. $
is used to prefix global variables. What you're thinking of as an operator is actually just a bunch of predefined global variables that Ruby provides for you, which happen to have odd names like $!
and $:
.
See http://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/variable.html