Using the device name explicitly might also be recommended, i.e. "nul:", rather than "nul"
On Feb 1, 2011, at 6:41 PM, Luis Lavena wrote: > On Tue, Feb 1, 2011 at 10:35 PM, Eric Hodel <drbr...@segment7.net> wrote: >> >> Luis, can you verify this does not break on rubyinstaller as well? > > It will only affect if user has a folder named dev at the root of the > drive, but that is highly unlikely ;-) > > irb(main):001:0> reader = File.open('/dev/null', 'r') > Errno::ENOENT: No such file or directory - /dev/null > from (irb):1:in `initialize' > from (irb):1:in `open' > from (irb):1 > > irb(main):001:0> writer = File.open('/dev/null', 'w') > Errno::ENOENT: No such file or directory - /dev/null > from (irb):1:in `initialize' > from (irb):1:in `open' > from (irb):1 > >> mkdir \dev > > irb(main):002:0> writer = File.open('/dev/null0', 'w') > => #<File:/dev/null0> > > But it will throw the exception first due the 'r' mode been invoked first. > > I think we are cool ;-) > -- > Luis Lavena > AREA 17 > - > Perfection in design is achieved not when there is nothing more to add, > but rather when there is nothing more to take away. > Antoine de Saint-Exupéry > _______________________________________________ > Rubygems-developers mailing list > http://rubyforge.org/projects/rubygems > Rubygems-developers@rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers _______________________________________________ Rubygems-developers mailing list http://rubyforge.org/projects/rubygems Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers