win32utils-devel@rubyforge.org
2004-Nov-13 07:12 UTC
[Win32utils-devel] Sanity check for win32-file
Hi all,
The code that I checked in yesterday that seemed to work just fine now
fails. When I run this:
require "win32/file"
fh = File.nopen("C:\\test.txt")
fh.close
I now get:
test.rb:12:in `initialize'': Invalid argument (Errno::EINVAL)
from test.rb:12:in `nopen''
Specifically, it''s failing on this in file.c:
args[0] = UINT2NUM(_open_osfhandle((long)h,O_RDWR));
self = rb_class_new_instance(1,args,rb_cFile); // BOOM
How could this work yesterday, and suddenly stop working today? What am I
missing?
Dan
