From: Tim Heaney Date: 2005-01-23T23:05:54+09:00 Subject: Re: File.read not returning nil [newbie] Navindra Umanee writes: > > I am completely confused. The documentation says it should print nil: > > http://www.rubycentral.com/book/ref_c_io.html#IO.read > > It does return nil in my first test case. It doesn't for me. I get the empty string both times. But why? It looks like there was a similar discussion in August of 2002 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/18089 but I don't know how to read Japanese. Nonetheless, I clearly get a different result than the one shown there $ ruby -e 'p IO.read("/dev/null")' "" $ ruby -v ruby 1.8.2 (2004-12-25) [i686-linux]