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 96406 - :class symbol is taken to be : and class keyword
Summary: :class symbol is taken to be : and class keyword
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-23 05:43 UTC by Torbjorn Norbye
Modified: 2007-07-03 14:43 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 Torbjorn Norbye 2007-02-23 05:43:09 UTC
This code snippet

x = {:class => "hello"}

gets lexed incorrectly; ":class" is taken to be a symbol followed by a keyword,
rather than a single symbol named :class.

This has some bad effects; this is boiled down from a file from Tim Bray which
reformats incorrectly. The problem is that "class" is taken to be a structural
element which captures its own "end", and so the imbalance causes ever
increasing indentation.
Comment 1 Torbjorn Norbye 2007-02-23 15:01:39 UTC
Fixed.

Checking in src/org/netbeans/modules/ruby/RubyLexer.java;
/cvs/scripting/ruby/editing/src/org/netbeans/modules/ruby/RubyLexer.java,v  <--
 RubyLexer.java
new revision: 1.6; previous revision: 1.5
done
Checking in manifest.mf;
/cvs/scripting/ruby/editing/manifest.mf,v  <--  manifest.mf
new revision: 1.9; previous revision: 1.8
done
Comment 2 Jiri Kovalsky 2007-07-03 14:00:36 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 3 Jiri Kovalsky 2007-07-03 14:43:40 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.