[Rubyinstaller-devel] Bug in Ruby File#open

Gordon Thiesfeld gthiesfeld at gmail.com
Thu Jun 5 18:58:33 EDT 2008


I've been running the rubyspecs[1] against Ruby 1.8.6 Mingw for the
past few days, and I think I've found a bug in File#open.

>> File.open('test'){} # create the file
=> nil
>> File.open('test', File::TRUNC)
Errno::EINVAL: Invalid argument - test
        from (irb):3:in `initialize'
        from (irb):3:in `open'
        from (irb):3
>>

That doesn't happen on linux

irb(main):002:0> File.open('test','w'){}
=> nil
irb(main):003:0> File.open('test',File::TRUNC)
=> #<File:test>

I'm hoping someone can point me in the right direction to track this
down.  Bug submissions without patches attached don't seem to get
fixed ;-)  I looked at file.c and io.c until my eyes bled, and
couldn't make heads or tails.

[1] http://rubyspec.org

Thanks,

Gordon


More information about the Rubyinstaller-devel mailing list