diff --git a/lib/ruby/site_ruby/shared/jruby/compiler.rb b/lib/ruby/site_ruby/shared/jruby/compiler.rb index 5b247510d2e..7c550860e95 100644 --- a/lib/ruby/site_ruby/shared/jruby/compiler.rb +++ b/lib/ruby/site_ruby/shared/jruby/compiler.rb @@ -192,7 +192,11 @@ def compile_files_with_options(filenames, options = default_options) errors += compile_proc[filename] } else - errors += compile_proc[filename] + if filename =~ /\.java$/ + files << filename + else + errors += compile_proc[filename] + end end end