Skip to content

Instantly share code, notes, and snippets.

@eam
Created November 14, 2017 22:21
Show Gist options
  • Save eam/21724d83c8fe2266b5d074690557fad0 to your computer and use it in GitHub Desktop.
Save eam/21724d83c8fe2266b5d074690557fad0 to your computer and use it in GitHub Desktop.
# terminal 1
eam@sprat:~$ ruby -e'puts $$; loop {}'
24358
# terminal 2
eam@sprat:~$ gdb -p 24358
gdb> p rb_eval_string("puts 'hello world'")
$1 = 0x8
# terminal 1
eam@sprat:~$ ruby -e'puts $$; loop {}'
24358
hello world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment