Interesting false positive on inspection

In the following two lines:

    others = Material.find_all_by_original_name(self.original_name)
    if others.length == 0 || (others.length == 1 && others[0].id == self.id)

The word "length" is underlined as wrong the first time it appears on that line, but not the second time. This same construct is used in two different places with two different models.

The message is:

            Cannot find 'length' for type 'Array of Material'

2 comments
Comment actions Permalink

Hello Paul,

Please file a bug report at http://youtrack.jetbrains.net/

In the following two lines:

others = Material.find_all_by_original_name(self.original_name)
if others.length == 0 || (others.length == 1 && others[0].id ==
self.id)
The word "length" is underlined as wrong the first time it appears on
that line, but not the second time. This same construct is used in two
different places with two different models.

The message is:

Cannot find 'length' for type 'Array of
Material'#inspection/RubyResolve


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hello Paul,

Could you please try the latest RubyMine 3.1.1 EAP build? It seems this problem is already fixed there.
More information is available here: http://blogs.jetbrains.com/ruby/2011/03/rubymine-3-1-1-eap-103-170-bug-fixes-and-performance-improvements/

Regards,
Oleg

0

Please sign in to leave a comment.