Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: None
-
Component/s: Core Classes/Modules, RubySpec, Windows
-
Labels:None
-
Number of attachments :
Description
Fails to RubySpec tests on Windows:
mspec -t j core\file\dirname_spec.rb jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-01-26 8d3d80c) (Java HotSpot(TM) Client VM 1.6.0_18) [x86-java] .....F..F. 1) File.dirname returns all the components of filename except the last one (edge cases on windows) FAILED Expected "/" to equal "//foo" D:/work/jruby-dev/rubyspec.git/core/file/dirname_spec.rb:57 D:/work/jruby-dev/rubyspec.git/core/file/dirname_spec.rb:3 D:/work/jruby-dev/rubyspec.git/core/file/dirname_spec.rb:55:in `load' D:/work/jruby-dev/mspec.git/bin/mspec-run:8 2) File.dirname returns the return all the components of filename except the last one (windows unc) FAILED Expected "\\" to equal "\\\\foo" D:/work/jruby-dev/rubyspec.git/core/file/dirname_spec.rb:89 D:/work/jruby-dev/rubyspec.git/core/file/dirname_spec.rb:3 D:/work/jruby-dev/rubyspec.git/core/file/dirname_spec.rb:55:in `load' D:/work/jruby-dev/mspec.git/bin/mspec-run:8 Finished in 0.090000 seconds 1 file, 10 examples, 45 expectations, 2 failures, 0 errors
It boils down to the following examples:
jruby -e "p File.dirname('\\\\foo\\bar.txt')" "\\\\foo" ruby -e "p File.dirname('\\\\foo\\bar.txt')" "\\\\foo\\bar.txt"
Issue Links
- duplicates
-
JRUBY-2724
Can not create Ruby on rails application while using UNC path folder
-
This is a 2724 duplicate, pull request for a fix here:
https://github.com/jruby/jruby/pull/178