Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Encountered this bug while using Cucumber. RSpec does something similar to the below. When I `include Java` at the top level of a project I'm testing I get an error.
# commenting out the next line fixes the bug
include Java
module Foo
unless defined?(Default)
class Default
end
end
end
Foo::Default.new
Credit to Aslak Hellesoy for helping track down this bug.
Usually, include Java is not recommended. It is much better and cleaner to use require 'java'. That way, no problem with the supplied example.