This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 190575 - Find Usages inside iteration loop sometimes searches for iterator rather than selected symbol
Summary: Find Usages inside iteration loop sometimes searches for iterator rather than...
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: issues@ruby
Depends on:
Reported: 2010-09-24 01:35 UTC by djlewis
Modified: 2011-01-28 20:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description djlewis 2010-09-24 01:35:56 UTC
Right-click, Find Usages often searches for the wrong symbol, namely the enclosing iterator rather than the selected symbol. In this code...

  class Huh

    def each_sorted
      s2 =  %w{cat elk dog bee ant}.sort
      s2.each {|str| yield str}

    def strange
      each_sorted do |c|
        @yyy = 99
      @xxx = 88
  def initialize
    @xxx = 77
    @yyy = 66

Right-click and Find Usages on the instance variables @xxx and @yyy.  The last three occurrences work fine, but the first @yyy inside strange searches instead for each_sorted.

This is probably related to the prior bug I submitted regarding proc and lambda, 190519
Comment 1 djlewis 2010-09-24 02:00:06 UTC
Using the native ruby platform, 1.9.2. This bug does not occur if I switch to JRuby!

Unfortunately, I am stuck with the native platform, since I am doing WIN32OLE stuff.