Pathname

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”

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