Skip to content

Instantly share code, notes, and snippets.

@bklang
Created June 10, 2011 14:59
Show Gist options
  • Save bklang/1018994 to your computer and use it in GitHub Desktop.
Save bklang/1018994 to your computer and use it in GitHub Desktop.
Pry threading test
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 }
@bklang
Copy link
Author

bklang commented Feb 19, 2012

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