In article <E1KfmVH-0001Rn-9p / x61.netlab.jp>,
  Yukihiro Matsumoto <matz / ruby-lang.org> writes:

> Really?  It checks for me:
>
> ruby -v -I .ext/i686-linux -E UTF-16LE -e "File.open('/tmp/xx', mode: 'w')"         
> ruby 1.9.0 (2008-09-16 revision 19380) [i686-linux]
> -e:1:in `initialize': ASCII incompatible encoding needs binmode (ArgumentError)
> 	from -e:1:in `open'
> 	from -e:1:in `<main>'
>
> But File.open(path, "w") does not check.  This is a bug.

File.open doesn't see "mode:" argument.

There is a reason this error is not occur in write mode.
-- 
Tanaka Akira