Details

    • Number of attachments :
      0

      Description

      mspec ci -t j core\file\join_spec.rb
      jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-01-26 d00b6d6) (Java HotSpot(TM) Client VM 1.6.0_18) [x86-java]
      ....F..........
      
      1)
      File.join joins parts using File::ALT_SEPARATOR on windows FAILED
      Expected "C:/windows"
       to equal "C:\\windows"
      
      D:/work/jruby-dev/rubyspec.git/core/file/join_spec.rb:23
      D:/work/jruby-dev/rubyspec.git/core/file/join_spec.rb:3
      D:/work/jruby-dev/rubyspec.git/core/file/join_spec.rb:55:in `load'
      D:/work/jruby-dev/mspec.git/bin/mspec-ci:8
      
      Finished in 0.069000 seconds
      
      1 file, 15 examples, 44 expectations, 1 failure, 0 errors
      

        Activity

        Hide
        Charles Oliver Nutter added a comment -
        Show
        Charles Oliver Nutter added a comment - Is this the fix? http://gist.github.com/307130
        Hide
        Hiro Asari added a comment -

        That will change all occurrences of file separators, and breaks a whole lot of specs.

        Show
        Hiro Asari added a comment - That will change all occurrences of file separators, and breaks a whole lot of specs.
        Hide
        Thomas E Enebo added a comment -

        This is some tweaky shit. If we fix it like Charles says it will fix this particular problem and probably match the windows C port, but at the cost of a bunch of libraries breaking because they are all written assuming unix-style separators. This is one aspect where Ruby could really give us direction or at least put their foot down and try and make Ruby more compatible across platforms. I personally think
        is wrong since it totally blows for things like Dir[] (let that sink in for a bit)...

        Show
        Thomas E Enebo added a comment - This is some tweaky shit. If we fix it like Charles says it will fix this particular problem and probably match the windows C port, but at the cost of a bunch of libraries breaking because they are all written assuming unix-style separators. This is one aspect where Ruby could really give us direction or at least put their foot down and try and make Ruby more compatible across platforms. I personally think is wrong since it totally blows for things like Dir[] (let that sink in for a bit)...
        Hide
        Benoit Daloze added a comment - - edited

        Actually, File.join does not add \, and the RubySpec description is very misleading:
        "joins parts using File::ALT_SEPARATOR on windows".

        The RDoc documentation is simple: "Returns a new string formed by joining the strings using File::SEPARATOR." (File::SEPARATOR being always "/").

        But the hidden behavior is MRI does keep the \ if they are present and do not insert '/'.
        This does not seem to be tested in MRI test/

        I wonder if this can be considered as a bug (Ruby is always returning paths with "/" when you give no \ ).

        And I agree there should be some unification of the separator (which seems already the direction, but could be stricter).

        I'll ask on ruby-core.

        Show
        Benoit Daloze added a comment - - edited Actually, File.join does not add \, and the RubySpec description is very misleading: "joins parts using File::ALT_SEPARATOR on windows". The RDoc documentation is simple: "Returns a new string formed by joining the strings using File::SEPARATOR." (File::SEPARATOR being always "/"). But the hidden behavior is MRI does keep the \ if they are present and do not insert '/'. This does not seem to be tested in MRI test/ I wonder if this can be considered as a bug (Ruby is always returning paths with "/" when you give no \ ). And I agree there should be some unification of the separator (which seems already the direction, but could be stricter). I'll ask on ruby-core.
        Hide
        Benoit Daloze added a comment -
        Show
        Benoit Daloze added a comment - Asked as http://bugs.ruby-lang.org/issues/6608

          People

          • Assignee:
            Unassigned
            Reporter:
            Vladimir Sizikov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: