win32utils-devel@rubyforge.org
2004-Nov-11 14:22 UTC
[Win32utils-devel] File.nopen alpha - another followup
Hi all,> fh = File.nopen("C:\\temp.txt",File::WRITE_ATTRIBUTES) > fh.hidden = true > fh.close > > I get "test.rb:16:in `hidden='': cannot convert nil into > String (TypeError)"It looks like this line is the culprit: rbPath = rb_funcall(self,rb_intern("path"),0,0); Hm...we could use GetFullPathName() if rbPath is nil. That, however, doesn''t deal with the fact that there are probably several other internal attributes that aren''t set if you use nopen(). I suppose I need to take a look at the open/new implementation in file.c and see what else it does, and try to imitate it the best I can. Dan