hi,
Thread#kill works as a script but not in irb
I though that the problem is that irb evals the code. But manually
evaling the code has the same problem.
Code:
t = Thread.new { kill }
puts t.inspect
irb eval’s code. but then this works as a script but does not work in
irb
eval “t = Thread.new { kill }; puts t.inspect”
Output:
runs successfully when run as a script ie. ruby
=> #<Thread:0x1dc5090 dead>
But running it on irb gives an error
load ‘/tmp/baz.rb’
=> #<Thread:0x2813678 dead>
IRB::NoSuchJob: No such job(#Thread:0x243e278).
from :0
PS: Thread#kill works as a script but not in irb · GitHub
regards,
deepak