I’m using the ruby-mysql library under JRuby and get the following warnings:
/mysql/protocol.rb:530 warning: GC.disable does nothing on JRuby
Is there any way to get JRuby to stop complaining about this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have a couple options.
First, you can run your program with the
-W0option which will disable all warnings. That’s probably not what you want.However, applying
-W0is the same as setting$VERBOSEtonil— so we can simply do that around the code where we want to suppress warnings. This is the second and much more preferable option.Running this with JRuby 1.5.0 correctly warns me about the reinitialized constant and correctly suppresses the
GC.disablewarning.