File::PATH_SEPARATOR with Windows Jruby #307

Closed
atambo opened this Issue Feb 9, 2011 · 3 comments

Comments

Projects
None yet
3 participants

atambo commented Feb 9, 2011

On windows server 2008 running jruby 1.6.0rc1 File::PATH_SEPARATOR returns ";". This ends up breaking the spec:rcov task because of this commit:

dbbb891

Reverting that commit fixed the issue for me.

atambo commented Feb 9, 2011

It looks like jruby uses java.io.File.pathSeparator as well:

https://github.com/jruby/jruby/blob/master/src/org/jruby/RubyInstanceConfig.java#L1129

Verifying that java and ruby both return ";" as the path separator:

C:>jirb
irb(main):001:0> require 'java'
=> true

irb(main):002:0> java.io.File.pathSeparator
=> ";"

irb(main):003:0> File::PATH_SEPARATOR
=> ";"

When I change:

cmd_parts << ["-Ispec#{File::PATH_SEPARATOR}lib", rcov_opts]

to:

cmd_parts << ["-Ispec:lib", rcov_opts]

or

cmd_parts << ["-Ispec", rcov_opts]

it works.

Contributor

luislavena commented Aug 25, 2011

@atambo: commented on the JRUBY bug, the issue seems Rcov doing inconsistent behavior than Ruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment