|
Java integration and module mixing in: msg#00036lang.jruby.user
Hello, This script fails for me with the following exception: require 'java' module Java include_class 'java.util.ArrayList' module Foo def hello; puts "hello"; end end class ArrayList include Foo # fails here; line 11 end end l = Java::ArrayList.new l.hello l.add("hi") puts l.toString() $ jruby const_test.rb P:\ruby\jruby\jruby- 0.8.2\src\builtin\javasupport.rb:148:in `const_missing': uninitialized constant Foo at ArrayList (NameError) from P:\ruby\jruby\jruby-0.8.2\src\builtin\javasupport.rb:148:in `const_missing' from const_test.rb:11 from :0 from :0 [exited with 1] If I change the failing line to "include Java::Foo" it works fine. A simpler script that mixes in a module without using the java integration works fine. Is this a bug? If so, I'll try to contribute a patch, but I might not be able to get to it right away... Cheers, /Nick |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: java.lang.reflect.Array considered harmful?: 00036, Charles O Nutter |
|---|---|
| Next by Date: | Re: Java integration and module mixing in: 00036, Charles O Nutter |
| Previous by Thread: | java.lang.reflect.Array considered harmful?i: 00036, Werner Schuster (murphee) |
| Next by Thread: | Re: Java integration and module mixing in: 00036, Charles O Nutter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |