![]() |
|
|
Issue Type:
|
Bug
|
Assignee:
|
Thomas E Enebo
|
Created:
|
12/Dec/12 3:19 AM
|
Description:
|
Using `ObjectSpace.each_object(Module)` to attempt to get a list of all modules and classes under JRuby has the effect of also reporting all of the `Java::Foo` compatibility wrapper modules. This would not be such a problem, except that these objects do not adhere to even the most basic contracts of what a Module should do.
For example, calling #name on these wrappers does not have the desired effect:
> Java::JavaUtilRegex.name
=> Java::JavaUtilRegexName
The #to_s method does work, but ideally so would #name and a handful of others.
Alternatively, is it really necessary that these wrappers advertise as Module instances? Calling #kind_of?, #ancestors, #class, etc. all do not work. Trying to create new classes inside the scope of these modules does not work. Attempting to include them yields a error like: "ArgumentError: Java package `java.util.regex' does not have a method `append_features'".
|
Project:
|
JRuby
|
Priority:
|
Major
|
Reporter:
|
Joshua Ballanco
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email