Skip to content

Instantly share code, notes, and snippets.

@fevrisn
Created May 14, 2013 07:47
Show Gist options
  • Save fevrisn/5574348 to your computer and use it in GitHub Desktop.
Save fevrisn/5574348 to your computer and use it in GitHub Desktop.
define eval
call(rb_p(rb_eval_string_protect($arg0,(int*)0)))
end
define redirect_stdout
call rb_eval_string("$_old_stdout, $stdout = $stdout, File.open('/tmp/ruby-debug.' + Process.pid.to_s, 'a'); $stdout.sync = true")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment