From: KOSAKI Motohiro Date: 2011-05-13T03:38:13+09:00 Subject: [ruby-core:36145] Re: Fwd: File.write take 4 Hi 2011/5/13 Yusuke ENDOH : > Hello, > > 2011/5/11 KOSAKI Motohiro : >>> Could I get any feedback on my latest patch for File.write? >>> It still merges into trunk fine, and passes the various unit tests associated. >>> I'd like to at least get some feedback on it. > > Sorry for late reply. �Your patch looks good to me as > a prototype. > But it could probably be better by Run Paint Run Run's > (or RubySpec folks') exhaustive review. > > > Ah, I noticed one thing. �It fails if encoding (or perm) > is given and there is no specified file yet: > > �$ rm -f t > �$ ./ruby -e 'p File.write("t", "foo", encoding: "UTF-8")' > �:82:in `initialize': No such file or directory - t > (Errno::ENOENT) Good catch! >> So, If nobody put objection in this week, I'll commit it. > > It would be better to rewrite the patch in C, I think. ok. you have better knowledge in this area. I'll reassign a ticket to you.