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 129606 - putting the cursor on a block variable in the declaration doesn't highlight it
Summary: putting the cursor on a block variable in the declaration doesn't highlight it
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-08 17:51 UTC by jamespb
Modified: 2011-01-28 20:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Highlight and font coloring errors (3.66 KB, text/plain)
2008-06-26 12:59 UTC, polan
Details
Highlight and font coloring errors (3.66 KB, image/png)
2008-06-26 12:59 UTC, polan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jamespb 2008-03-08 17:52:00 UTC
Put your cursor on the "&block" in line 1.  The other instance of &block isn't highlighted.  Put your cursor on the
&block  in line 3, and both &blocks are highlighted.  Seems like these should work the same way.

('name' and 'content' works as expected)

   def content_for(name, content = nil, &block)
        existing_content_for = instance_variable_get("@content_for_#{name}").to_s
        new_content_for      = existing_content_for + (block_given? ? capture(&block) : content)
        instance_variable_set("@content_for_#{name}", new_content_for)
      end
Comment 1 Erno Mononen 2008-03-31 11:11:10 UTC
Still reproducible in Build 080328.
Comment 2 polan 2008-06-26 12:58:29 UTC
Still reproducible in 6.5M1 [Build 200806260103].

This code does highlight '*args' both ways, but doesn't hightlight '&block' at all (either using the one in the method 
body or in def). 

  def hello1(*args, &block)
    hello(*args, &block)
  end

NOTE: Also note that * and & characters in method body are printed in black instead of orange, as in the line above. See 
image.
NOTE: When you highlight '*args', in the method body, ony 'args' is highlighted (* still black). See image.
Comment 3 polan 2008-06-26 12:59:00 UTC
Created attachment 63508 [details]
Highlight and font coloring errors
Comment 4 polan 2008-06-26 12:59:05 UTC
Created attachment 63510 [details]
Highlight and font coloring errors
Comment 5 Erno Mononen 2009-09-17 09:34:32 UTC
I'll try to address in 6.8.
Comment 6 Erno Mononen 2010-04-29 14:11:26 UTC
Reproducible in 6.9 too.