# Pathname

**URL:** <https://www.ruby-forum.com/t/pathname/118131>\
**Category:** IronRuby\
**Created:** [October 24, 2007, 4:41am UTC](https://www.ruby-forum.com/t/pathname/118131 "2007-10-24T04:41:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [October 24, 2007, 4:41am UTC](https://www.ruby-forum.com/t/pathname/118131/1 "2007-10-24T04:41:18Z")

</div>

John L. wrote:

> after looking at your changes to the Rakefile, most of them fall in the bucket of using File.join() to concatenate pathname elements rather than using a canonical delimiter ‘’. I was under the impression that the pathname2 library would do the correct thing under Linux and convert the ‘’ to ‘/’.

I think the intended way to use the library is not to use delimiter at  
all.

irb(main):001:0\> require ‘pathname2’  
=\> true  
irb(main):002:0\> root = Pathname.new(‘root’)  
=\> “root”  
irb(main):003:0\> root + ‘subdir’ # not ‘\subdir’  
=\> “root/subdir”

---

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [October 24, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/pathname/118131/2 "2007-10-24T20:53:03Z")

</div>

Sanghyeon S.:

> I think the intended way to use the library is not to use delimiter at  
> all.
> 
> irb(main):001:0\> require ‘pathname2’  
> =\> true  
> irb(main):002:0\> root = Pathname.new(‘root’) =\> “root”  
> irb(main):003:0\> root + ‘subdir’ # not ‘\subdir’  
> =\> “root/subdir”

That’s exactly the insight that I was looking for. Thanks, Seo!

The latest Rakefile that I checked in takes advantage of this  
observation, so it _should_ just work on Linux now. I’m trying to spin  
up the Mono vmware image here to get the ball rolling on my end so that  
I can do some verification of this stuff before throwing over the wall.

Thanks,  
-John
