Hi,
I have noticed the following Ruby-on-Windoze gotcha:
File.expand_path("~$some_m$word_tmp_file", “.”)
returns just the filename, no expansion is done. I guess this has
something to do with Unix using names starting with “~” for home
directories.
I wonder whether this could/should be fixed.
Hi,
I have noticed the following Ruby-on-Windoze gotcha:
File.expand_path(“~$some_m$word_tmp_file”, “.”)
returns just the filename, no expansion is done. I guess this has
something to do with Unix using names starting with “~” for home
directories.
I wonder whether this could/should be fixed.
What version of Ruby? Here’s what I got:
C:\>irb
irb(main):001:0> File.expand_path("~/temp")
ArgumentError: couldn't find HOME environment -- expanding `~/temp'
from (irb):1:in `expand_path'
from (irb):1
irb(main):002:0> VERSION
=> "1.6.8"
I guess, it would not be a fix but an additional feature. The “~”
Well, I would simply like file names beginning with “~” to expand on
Windoze as any other file, that is, have the containing directory
prepended, instead of the string being returned as is. This current
behaviour seems broken to me.
expansion on Unix systems is a shell feature and no Unix built in
functionality.