From: nobu.nokada@... Date: 2002-03-22T00:46:41+09:00 Subject: Re: Windows version of Ruby (proposals) Hi, At Thu, 21 Mar 2002 23:04:55 +0900, Dave Thomas wrote: > Does popen work with "w+" in your version of Ruby under Windows? IIRC, Usa has a patch makes it work, but not merged yet. > Then, we provide a set of environment support modules for those > classes that currently contain non-portable methods. We could have > (for example) (snip) > Mix one of these into class File and you'll get all the system > dependent calls. You'll also be explicitly marking your code as > non-portable. Sounds nice. > I think I'd then take this a step further and add a new method to > Kernel called 'sysdep' > > sysdep :win32 > would be the same as 'require "sysdep_win32"' > > sysdep :win32, File, Dir > would be the same as > > class File > include SysdepFileWin32 > end > > class Dir > include SysdepDirWin32 > end Isn't it enough with `require'? require 'sys/win32' # loads Windows specific # modules and mixes-in. require 'sys/win32/file' # file related only. class File module Win32 end include Win32 end -- Nobu Nakada