-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
In 1.7 we stopped caching the wrappers for Java objects that enter Ruby, and introduced warnings for two cases that could be affected:
- creating a singleton object from one of these wrappers
- setting instance variables on one of these wrappers
The singleton case still warns today (JRuby 9.4.12.0-SNAPSHOT on master), but the instance variable case does not:
$ jruby -e 'class << java.lang.Object.new; end'
-e:1: warning: singleton on non-persistent Java type Java::JavaLang::Object (https://github.com/jruby/jruby/wiki/Persistence)
$ jruby -e 'java.lang.Object.new.instance_variable_set(:@foo, 1)'
$ jruby -X-C -e 'java.lang.Object.new.instance_variable_set(:@foo, 1)'
$
We must restore this warning and add tests to ensure it is not broken again.
Relates to #8224.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels