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.
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
Still reproducible in Build 080328.
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.
Created attachment 63508 [details] Highlight and font coloring errors
Created attachment 63510 [details] Highlight and font coloring errors
I'll try to address in 6.8.
Reproducible in 6.9 too.