Skip to content

Instantly share code, notes, and snippets.

@nateberkopec
Created November 22, 2016 17:39
Show Gist options
  • Save nateberkopec/0dacb47501043e44e0e9a12177c8dd5d to your computer and use it in GitHub Desktop.
Save nateberkopec/0dacb47501043e44e0e9a12177c8dd5d to your computer and use it in GitHub Desktop.
In thread: #<Process::Status: pid 56845 exit 1>
Global value: #<Process::Status: pid 56844 exit 0>
`echo "hey!"`
thread_match = nil
t = Thread.new do
`uname -c`
thread_match = "In thread: #{$?.inspect}"
end
t.join
puts [thread_match, "Global value: #{$?.inspect}"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment