Possible error with Dir.pwd
---------------------------

                 Key: JRUBY-3462
                 URL: http://jira.codehaus.org/browse/JRUBY-3462
             Project: JRuby
          Issue Type: Bug
         Environment: OS X (Darwin 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 
24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 i386)
            Reporter: blair christensen.
            Assignee: Thomas E Enebo


When using a fresh checkout of r9336 several tests fail depending upon what 
directory I am in.  They also fail for C Ruby.

I have JRuby trunk checked out into "~/Documents/p/jruby.trunk" but I also have 
a symbolic link from "~/p" to "~/Documents/p" to save me some typing.

% ls -ld ~/Documents/p
drwxr-xr-x  12 blair  staff  408 Mar  2 14:00 /Users/blair/Documents/p

% ls -ld ~/p
lrwxr-xr-x  1 blair  staff  24 Nov 25 11:13 /Users/blair/p -> 
/Users/blair/Documents/p

When "ant test" is run from within "~/Documents/p/jruby.trunk" I get no test 
failures.  When I run from within "~/p/jruby.trunk" I get several failures in  
"./test/externals/ruby_test/test/core/Dir/class/tc_getwd.rb":

  1) Failure:
test_getwd(TC_Dir_Getwd_Class) 
[./test/externals/ruby_test/test/core/Dir/class/tc_getwd.rb:25]:
<"/Users/blair/p/jruby.trunk"> expected but was
<"/Users/blair/Documents/p/jruby.trunk">.

  2) Failure:
test_pwd(TC_Dir_Getwd_Class) 
[./test/externals/ruby_test/test/core/Dir/class/tc_getwd.rb:36]:
<"/Users/blair/p/jruby.trunk"> expected but was
<"/Users/blair/Documents/p/jruby.trunk">.

I also get the same errors when testing with the two CRuby installations on 
this machine:

% /usr/bin/ruby --version
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

% /opt/local/bin/ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9]

Given that the CRuby fails these tests and "pwd" agrees with the results being 
returned by JRuby and CRuby, does "Dir.pwd" need to be modified not to expand 
links in parent directories?  Or is this a problem with the test case?  I'm 
willing to work on a patch but I wasn't sure what the desired behavior should 
be.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to