File.expand_path does not work as expected
------------------------------------------
Key: JRUBY-1606
URL: http://jira.codehaus.org/browse/JRUBY-1606
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.1b1
Environment: Mac OS X 10.4.10
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]
Reporter: Simon Chiang
Assignee: Thomas E Enebo
Priority: Minor
File.expand_path does not work in JRuby as in Ruby for filepaths like "/./dir".
This can most easily be seen in irb vs jirb:
>irb
irb(main):001:0> File.expand_path("/./dir")
=> "/dir"
>jirb
irb(main):001:0> File.expand_path("/./dir")
=> "//dir"
I got confused trying to make a patch or test case... but here's what the test
would look like:
def test_expand_path_for_paths_beginning_with_forward_slash
assert_equal("/dir", File.expand_path("/./dir"))
end
--
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