In article <000701c07d3d$8f911160$01f9fea9 / austin.rr.com>, hal9000
@hypermetrics.com says...

# I'm interested in what people think of this behavior...
# (1.6.1 on Win98)
# 
#     Dir.chdir ("\\")
#     puts Dir.pwd     # "/"
# 
# OK, I can live with that one... what about:
# 
#     Dir.chdir("C:\\")
#     puts Dir.pwd    # "/cygwin/c"
# 
# Hmm! In a way I understand it, but in a way I'm
# unhappy with it. I am *not* using all of cygwin...
# just the DLL.

If you built Ruby using Cygwin (or downloaded a binary distro built with 
Cygwin) then this is what you get. If you build with MSVC, as I did, 
then you get regular Win path stuff working as you would expect. Here's 
the above with my version of Ruby:

[c:\]irb
irb(main):001:0> Dir.chdir("\\")
0
irb(main):002:0> Dir.pwd
"C:/"
irb(main):003:0> Dir.chdir("c:\\")
0
irb(main):004:0> Dir.pwd
"C:/"
irb(main):005:0> Dir.chdir("c:\\new\\smalltalk")
0
irb(main):006:0> Dir.pwd
"c:/new/smalltalk"
irb(main):007:0>

It does turn the backslash into a slash, but it behaves as expected.

Joey 
-- 
-- Sun Certified Java2 Programmer
-- Political Rants: www.joeygibson.com
-- My Pocket Smalltalk Stuff: www.joeygibson.com/st
--
-- "We thought about killin' him, but we kinda 
--  hated to go that far...."



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----