# Re: A little idiom I like

**URL:** <https://www.ruby-forum.com/t/re-a-little-idiom-i-like/67871>\
**Category:** Ruby\
**Created:** [September 7, 2006, 3:08pm UTC](https://www.ruby-forum.com/t/re-a-little-idiom-i-like/67871 "2006-09-07T15:08:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [September 7, 2006, 3:08pm UTC](https://www.ruby-forum.com/t/re-a-little-idiom-i-like/67871/1 "2006-09-07T15:08:53Z")

</div>

> > 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

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.
