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 159262 - Incorrect Ruby syntax coloring
Summary: Incorrect Ruby syntax coloring
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: issues@ruby
Depends on:
Reported: 2009-02-26 21:51 UTC by fjan11
Modified: 2011-01-28 20:13 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 fjan11 2009-02-26 21:51:02 UTC
def max(a,b); a>b ? a : b; end
	def min(a,b); a<b ? a : b; end

Oddly enough, the function max gets colored correctly, by the function min does not (the 'b' stays black)
Comment 1 Erno Mononen 2009-02-27 07:08:42 UTC
Hmm, seems to work for me in the very latest build. Which build are you using (Help -> About)? Does closing the file 
and opening it again help? 
Comment 2 fjan11 2009-02-27 08:28:20 UTC
That's odd since it should be easy to reproduce. For me, it happens on 6.5, 6.7M2 and the latest build (it does take a little while for the coloring to show 
up). I found that inserting spaces around the < fixes it, so this one is fine:

def min(a,b); a < b ? a : b; end 

As far as bugs go this is a tiny one, but I thought I'd report it since it may be indicative of a larger issue
Comment 3 Erno Mononen 2009-02-27 08:39:31 UTC
Oops, sorry -- I didn't look carefully enough, indeed the 'b' in a<b stays black for me too (in 'a : b' it's colored 
correctly though). I will look into this, thanks for reporting.
Comment 4 Erno Mononen 2010-04-29 11:57:44 UTC
I'll try to fix this for 6.9, should be simple unless the problem is in the AST produced by the parser.