# A little idiom I like

**URL:** <https://rubytalk.org/t/a-little-idiom-i-like/30745>\
**Category:** ruby-talk\
**Created:** [7 September 2006 13:07 UTC](https://rubytalk.org/t/a-little-idiom-i-like/30745 "2006-09-07T13:07:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berger\_Daniel1](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@Berger\_Daniel1](https://rubytalk.org/u/Berger_Daniel1)\
**Post date:** [7 September 2006 13:07 UTC](https://rubytalk.org/t/a-little-idiom-i-like/30745/1 "2006-09-07T13:07:38Z")

</div>

Oops. That should have said, "...convert all forward slashes to  
backslashes \*on Windows\*".

Ok, technically, it uses File::ALT\_SEPARATOR if it has one. Otherwise,  
it uses File::SEPARATOR.

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.

> **···**
>
> > -----Original Message-----  
> > From: Austin Ziegler [mailto:halostatue@gmail.com]  
> > Sent: Wednesday, September 06, 2006 7:53 PM  
> > To: ruby-talk ML  
> > Subject: Re: A little idiom I like
> > 
> > On 9/6/06, Berger, Daniel \<Daniel.Berger@qwest.com\> wrote:  
> > \> Indeed. This is why all paths generated using the  
> > pathname2 package  
> > \> convert all forward slashes to backslashes. Also, the  
> > various PathXXX  
> > \> functions do NOT work with forward slashes.
> > 
> > Inasmuch as is possible, where Ruby provides these, it should  
> > hide this distinction. I would hate to have to enter \\ every  
> > time I wanted to put two files together. (It would also  
> > increase the mismatch between Ruby Windows and everywhere  
> > else, so the more we can hide that the more portable we make Ruby.)
> > 
> > -austin
