[Win32utils-devel] file-temp failure

Daniel Berger djberg96 at gmail.com
Sat Apr 12 10:22:59 EDT 2008


Hi all,

Anyone know why this code would work with VC++ 6, but fail with VC++ 8? 
Attached is the source.

The sample code I tried is:

require 'file/temp'
fh = FileTemp.new
fh.puts "hello"
fh.close

But it chokes with an Errno::EBADF error in the call to FileTemp.new.

I tried removing the call to tmpfile_s() and just using tmpfile(), but 
that didn't seem to matter.

Thanks,

Dan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.rb
Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20080412/c0e1e4f3/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: extconf.rb
Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20080412/c0e1e4f3/attachment-0001.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.c
Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20080412/c0e1e4f3/attachment.c 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.h
Url: http://rubyforge.org/pipermail/win32utils-devel/attachments/20080412/c0e1e4f3/attachment.h 


More information about the win32utils-devel mailing list