Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.5
-
Fix Version/s: None
-
Component/s: Windows
-
Labels:None
-
Number of attachments :
Description
if you use -d and -t options then jrubyc --java does not work and fails silently - no output at all. same thing under linux works fine.
the code to reproduce it is:
http://gist.github.com/404663
see also the related email thread
http://archive.codehaus.org/lists/org.codehaus.jruby.user/msg/AANLkTikERB_cR6VGh-YrYPEATTMH3yymCc-FkMUrrzkc@mail.gmail.com
I'm seeing the same problem. The issue is that Ruby (as of Ruby 1.8.6) only support / as a path separator, not \. Since JRuby uses Dir[*filenames] the solution appears to be to fix the path using File.expand_path to Rubyize the path. For example changing line 174 in compiler.rb from:
Dir[*filenames].each do |filename|
to
filenames_expanded = filenames.map
{ |filename| File.expand_path(filename) }Dir[*filenames_expanded].each do |filename|
seems to fix the problem. This thread talks about the issue with using windows backslashes in Ruby:
http://groups.google.com/group/ruby-talk-google/browse_frm/thread/d153336ca4fabc7b/0752cf1c7dbc4b28?hl=en&lnk=gst&q=dir.glob+backslash#0752cf1c7dbc4b28