On Tue, Jun 9, 2009 at 4:36 PM, Christoph
Jasinski<christoph.jasinski / googlemail.com> wrote:
> Hi all,
> I wanted to write a program that request stock quotes say every second. S=
o I
> started to write a thread like this:
>
> =A0require 'rubygems'
> =A0require 'yahoofinance'
>
> =A0thread=3DThread.new do
> =A0 =A0YahooFinance::get_historical_quotes_days( 'goog', 10 ) do |row|
> =A0 =A0 =A0puts "YHOO,#{row.join(',')}"
> =A0 =A0end
> =A0end
>
> When I run this I don't get any results. Which is really weird. Got all t=
he
> gems and so on.
> But when I do the same code run in IRB it works! without any surprises. I
> don't get it. Really.
>
> Thanks for any help.
>
> Chris
>

Not sure, but adding 'thread.join' to the end might help.

--=20
Vikhyat Korrapati
http://aetus.net/