From: Florian Frank Date: 2004-10-05T23:35:19+09:00 Subject: Hello, The latest changes in io.c (ruby 1.8) are quite a disaster. I have put an rb_warn(mode) at the beginning of rb_fopen and strange things are happening. w+ doesn't work any more, it should create a file if it doesn't already exist: (flori@closure:flori/ 1)$ ruby -e 'File.new("foo", "w+")' -e:1: warning: r+ -e:1:in `initialize': No such file or directory - foo (Errno::ENOENT) from -e:1:in `new' from -e:1 Appending doesn't work either: (flori@closure:flori/ 0)$ ruby -e 'File.new("foo", "a").puts "bla"' -e:1: warning: w (flori@closure:flori/ 0)$ ruby -e 'File.new("foo", "a").puts "blu"' -e:1: warning: w (flori@closure:flori/ 0)$ cat foo blu In rb_file_open_internal rb_io_mode_flags and rb_io_flags_mode are called and this leads to the loss of important mode information. Florian Frank