R
Roger Pack
question:
if I run some code within the following directory structure
/substruct_start_and_bootstrap_if_necessary.rb
/substruct [directory]
/config
boot.rb
this code is within substruct_start_and_bootstrap_if_necessary.rb [and I
run it from the directory that file is in]:
Dir.chdir 'substruct'
puts File.dirname(__FILE__)
in Linux
=> /home/rdp/dev/ruby-benchmark-suite/rails
in windows
=> .
I assume this is a windows bug [if you do a chdir then File.dirname is
off after that point].
?
However, in Linux
Dir.chdir '/'
puts File.dirname(__FILE__)
results in '.' [which is wrong at that point], too.
Thoughts?
-=r
if I run some code within the following directory structure
/substruct_start_and_bootstrap_if_necessary.rb
/substruct [directory]
/config
boot.rb
this code is within substruct_start_and_bootstrap_if_necessary.rb [and I
run it from the directory that file is in]:
Dir.chdir 'substruct'
puts File.dirname(__FILE__)
in Linux
=> /home/rdp/dev/ruby-benchmark-suite/rails
in windows
=> .
I assume this is a windows bug [if you do a chdir then File.dirname is
off after that point].
?
However, in Linux
Dir.chdir '/'
puts File.dirname(__FILE__)
results in '.' [which is wrong at that point], too.
Thoughts?
-=r