Unnecessary warnings in the ruby syntax (using jruby). How to avoid them?
Hello guys,
I have started using IDEA a few weeks ago to develop in JRuby. In general I've found IDEA better than Aptana RadRails, but I am having some minor problems with Jruby syntax warnings.
In my code I have the following:
Java::com.etc.etc
The line works perfectly at runtime but I receive a warning saying that "Cannot find 'com' for the type 'java'". The line is correct. Is there anyway to stop this warning without disabling other warnings? The same happens with require 'java'.
Also there is something strange with the classes that belong to "thread.rb" module. Like "Mutex", "Queue", "SizeQueue", etc. Whenever one of these classes are mentioned in the code, I get, for instance, "cannot find 'Mutex' ". This happens including or not including the require "thread". Any ideas also in how to avoid this particular warning? The code also works correct.
In general I've found the warnings and suggestions of IDEA much more useful than the ones with Aptana. But I cannot find a solution for these two little problems.
Thanks,
GA
请先登录再写评论。
Hello gacilu,
We already have an issue on this problem: http://www.jetbrains.net/jira/browse/RUBY-1678. Feel free to vote and track progress on it.
What version of JRuby do you use?
Thanks,
Oleg
Thanks for your answer.
I use jruby 1.1.6. Is there any known problem?
Thanks,
GA
It's strange the class "Thread" does not produce the warning. All the others do: Mutex, Queue, SizedQueue and Kernel at least.