Skip to content

Instantly share code, notes, and snippets.

@MiSawa
Created October 28, 2014 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MiSawa/e290dcacea935d9f15b7 to your computer and use it in GitHub Desktop.
Save MiSawa/e290dcacea935d9f15b7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'pry'
require 'pry-nav'
require 'simple-random'
$bind = false
Signal.trap(:SIGUSR1) do
$bind = true
end
def bind!
return unless $bind
$bind = false
binding.pry
end
res = []
loop do
sleep 10
100.times do |i|
res << i
end
bind!
res = []
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment