On Dec 22, 2007 3:46 PM, Igor Peshansky <[EMAIL PROTECTED]> wrote: > As I mentioned before, I don't use Ruby too often. But I just realized > something: to reproduce the error, you needed a "require > 'nonexistent_file'", which will obviously set errno to ENOENT (which is > exactly the error you're seeing). It's possible that File.read checks > errno and exits right away if it's non-zero, and that nothing resets errno > before File.read. Inserting the puts call will likely reset errno, thus > avoiding the bug. So, the bug is probably in Ruby code for exception > handling ("rescue") -- it should reset errno so that subsequent code isn't > affected (and it's also suspicious that the File.read code checks errno > without a valid reason, e.g., a non-zero return value).
Looks like you got it right. They just fixed the Ruby source: http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/io.c?r1=13774&r2=14858 I made the change to my io.c in the stable-snapshot and it compiles OK and runs my test script without the not-found error. Not sure how long this will take to find its way into Cygwin's ruby package, but I'm glad it was finally solved. Mike Boone. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/