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 181614 - Comment mistaken as proceeding variable.
Summary: Comment mistaken as proceeding variable.
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: issues@ruby
Depends on:
Reported: 2010-03-07 09:15 UTC by blewisjr86
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 blewisjr86 2010-03-07 09:15:51 UTC
It appears as if in the editor it is mistaking a comment as the variable that proceeds the comment.


# A simple comment
some_var = "A simple variable"
a_number = 2
another_var = some_var + a_number.to_s

In the preceding example the comment is being recognized as the variable some_var.

If you click the comment it hints that it is some_var by highlighting the variable some_var in the line another_var = some_var + a_number.to_s

Also if you remove the last two lines from the example the editor hints that the comment is unused instead of hinting that the variable some_var is unused.
Comment 1 Erno Mononen 2010-03-08 07:22:07 UTC
Thanks for the report. I was able to reproduce this with 1.9, is that what you are using too? Seems that the problem is in the 1.9 parser.
Comment 2 blewisjr86 2010-03-08 11:56:03 UTC
Yes it only happens with the 1.9 interpreter just tested again now with 1.8.7.  I also noticed this affects anything that comes right after a comment not just variables but functions as well.  So it definitely seems like a parser issue.