Created
June 10, 2011 14:59
-
-
Save bklang/1018994 to your computer and use it in GitHub Desktop.
Pry threading test
This file contains 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
require 'rubygems' | |
require 'pry' | |
#require 'rbtrace' | |
puts $$ | |
threads = [] | |
threads << Thread.new do | |
loop do | |
puts "Thread 1" | |
sleep 1 | |
end | |
end | |
threads << Thread.new do | |
pry | |
end | |
threads << Thread.new do | |
loop do | |
puts "Thread 2" | |
sleep 1 | |
end | |
end | |
threads.each {|t| t.join } |
Another way to fix this with rvm:
rvm pkg install readline
rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
Also works for other versions of Ruby.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I compiled 1.9.3 off the branch by hand using gcc not llvm-gcc, I don't use RVM and I ran distclean since upgrading to OS X 10.7.
If I leave either ruby or ruby19 running it'll continue forever