Created
October 28, 2014 09:47
-
-
Save MiSawa/e290dcacea935d9f15b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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