Project

General

Profile

Backport #1226

File.dirname should return full paths after a chdir

Added by rogerdpack (Roger Pack) over 10 years ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:22593]

Description

=begin
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!
=end

History

#1

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

=begin
Hi,

At Sun, 1 Mar 2009 00:30:37 +0900,
Roger Pack wrote in [ruby-core:22593]:

which I believe is unexpected.

It was expected. The change is a side effect of changeset
from r18197 through 18253.

--
Nobu Nakada

=end

#2

Updated by rogerdpack (Roger Pack) about 9 years ago

=begin

It was expected. The change is a side effect of changeset
from r18197 through 18253.

Is this behavior desired then?
=end

#3

Updated by jeremyevans0 (Jeremy Evans) 7 days ago

  • Status changed from Open to Closed
  • Description updated (diff)
  • Project changed from Ruby 1.8 to Backport187

Also available in: Atom PDF