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 138362 - Ruby code incorrect method highlight
Summary: Ruby code incorrect method highlight
Status: RESOLVED WONTFIX
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-26 13:58 UTC by polan
Modified: 2009-11-02 11:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description polan 2008-06-26 13:58:43 UTC
[Build 200806260103, JDK 1.6.0]

I've encountered several code highlighting inconsistencies while testing Ruby in 6.5M1. This may be a P4, but anyway, 
try these examples:

1) Have this code ( | represents cursor):

  def hell|o(new)
    hello(5)
    a = hello(5, 6)
  end

ERROR: 'a = hello(5,6]' highlights
NOTE: This does not depend on the number of parametres of the defined method, i.e. 'hello()' and 'hello
(arg1,arg2,arg3)' also triggers highlight of the expression


2) Have this code ( | represents cursor):

  def hello(arg1, arg2)
  end

  def hello()
    hello(1)
    hello(1, 2)
  end

  def hello1(*args, &block)
    he|llo(*args, &block)
  end

ERROR: Every occurence of 'hello' method highlights.
NOTE: Also, it is possible to highlight 'hello(*args, &block)' by having the cursor in 'he|llo(1)'
Comment 1 Erno Mononen 2009-05-19 15:15:45 UTC
Still valid.
Comment 2 Erno Mononen 2009-08-25 15:48:19 UTC
After having a closer look at this I'm downgrading as Ruby doesn't support method overloading, so this isn't really a 
valid use case.
Comment 3 Quality Engineering 2009-11-02 11:13:52 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX