Backport #1226: File.dirname should return full paths after a chdir
http://redmine.ruby-lang.org/issues/show/1226

Author: Roger Pack
Status: Open, Priority: Normal

with these files:

./in_root.rb:

  Dir.chdir 'subdir'
  require 'in_subdir'


subdir/
  in_subdir.rb:
    puts File.dirname(__FILE__)

with 1.8.7/1.9:

$ ~/installs/ruby_1_8_7_svn_installed/bin/ruby -v top.rb
ruby 1.8.7 (2009-01-14 revision 21505) [x86_64-linux]
/home/rdp/dev/file__bug/subdir/config/boot

with 1.8.6:
$ ~/installs/ruby_1_8_6_svn_installed/bin/ruby -v top.rb
ruby 1.8.6 (2009-02-25 patchlevel 355) [x86_64-linux]
./config/boot

which I believe is unexpected.
Thanks!


----------------------------------------
http://redmine.ruby-lang.org