runtime/process_title_no_parens.rb
tests/_examples/runtime/process_title_no_parens.rb in the metorex repository.
# Process.setproctitle changes the command a process listing shows, and
# leaves $0 as it was.
title = "metorex-title-example"
p Process.setproctitle(title)
p $0 == title
Output:
"metorex-title-example"
false