You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
warning: OpenStruct#define_singleton_method accesses caller method's state and should not be aliased #7031
jruby 9.3.3.0 now shows the following warning.
It did not show up in jruby 9.3.2.0.
Environment Information
jruby 9.3.3.0 (2.6.8) 2022-01-19 b26de1f OpenJDK 64-Bit Server VM 11.0.13+8-Ubuntu-0ubuntu1.20.04 on 11.0.13+8-Ubuntu-0ubuntu1.20.04 +jit [linux-x86_64]
Expected Behavior
No warning is displayed.
Actual Behavior
The following warning is displayed.
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/ostruct.rb:464: warning: OpenStruct#define_singleton_method accesses caller method's state and should not be aliased
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/ostruct.rb:468: warning: OpenStruct#block_given? accesses caller method's state and should not be aliased
Thanks for the correction.
I have confirmed that it works with 9.3.4.0, but I still have the following warning.
$ java -cp . -jar ./jruby-complete-9.3.4.0.jar -vw -e 'require "ostruct"'
jruby 9.3.4.0 (2.6.8) 2022-03-23 eff48c1ebf OpenJDK 64-Bit Server VM 11.0.14+9-Ubuntu-0ubuntu2.20.04 on 11.0.14+9-Ubuntu-0ubuntu2.20.04 +jit [x86_64-linux]
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/ostruct.rb:468: warning: OpenStruct#block_given? accesses caller method's state and should not be aliased
Unfortunately we are still waiting for ruby/ostruct#41 to get into an ostruct release. Once that happens you should be able to install it and eliminate the last warning.
Activity
enebo commentedon Jan 26, 2022
Linking to ruby/ostruct#40 which references ruby/ostruct#30.
headius commentedon Mar 17, 2022
Fixed by #7055.
yamam commentedon Mar 23, 2022
Thanks for the correction.
I have confirmed that it works with 9.3.4.0, but I still have the following warning.
headius commentedon Mar 24, 2022
Unfortunately we are still waiting for ruby/ostruct#41 to get into an ostruct release. Once that happens you should be able to install it and eliminate the last warning.
cc @marcandre
headius commentedon Mar 24, 2022
@yamam ostruct 0.5.4 has been released!
Update to latest ostruct
headius commentedon Mar 31, 2022
And ostruct 0.5.5 has been released to fix one last issue (ruby/ostruct#45).