> -----Original Message-----
> From: Luke Kanies [mailto:luke / madstop.com] 
> Sent: Saturday, August 19, 2006 11:11 PM
> To: ruby-talk ML
> Subject: Re: Dir.bitbucket?
> 
> 
> On Aug 19, 2006, at 11:34 PM, Daniel Berger wrote:
> 
> > Hi all,
> >
> > Occasionally I have to do something like this:
> >
> > bitbucket = RUBY_PLATFORM.match('mswin') ? 'NUL' : '/dev/null'
> >
> > How about a Dir.bitbucket method? Or Dir.null, or whatever you want
> > to call it.
> 
> it's not quite the same thing, since it's not a part of the Ruby  
> core, but I've got a library, Facter[1], specifically meant to help  
> handle this kind of platform variety.  This kind of simple 
> code would  
> look like this:
> 
> Facter.add :bitbucket do
> 	setcode do
> 		case Facter.operatingsystem
> 		when /mswin/i: 'NUL'
> 		when /amiga/i: 'NIL'
> 		when /openvms/i: 'NL:'
> 		else
> 			'/dev/null'
> 		end
> 	end
> end

<snip>

That's interesting, though personally I'd rather just have something in
the core.  I mean, we have Dir.tmpdir (in the tmpdir package).  Why not
Dir.bitbucket?

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.