[SVN] [PATCH] support.class.ruby

Grant Hollingworth grant at antiflux.org
Fri May 25 20:07:32 UTC 2007


The attached patch changes the support.class.ruby regex to match variable.other.constant.ruby, since class names are in fact constants.  Specifically, it removes the requirement that the second letter be a lowercase letter.  Prototype[1], for instance, has an IEBrowser class in its jstest.rb file.

This also allows class names to be one character long while they were formerly at least two.  Is that a problem for anything else in the grammar?

[1] http://prototypejs.org/
-------------- next part --------------
Index: Ruby.tmbundle/Syntaxes/Ruby.plist
===================================================================
--- Ruby.tmbundle/Syntaxes/Ruby.plist	(revision 7206)
+++ Ruby.tmbundle/Syntaxes/Ruby.plist	(working copy)
@@ -336,7 +336,7 @@
 		</dict>
 		<dict>
 			<key>match</key>
-			<string>\b[A-Z][a-z]\w*(?=((\.|::)[A-Za-z]|\[))</string>
+			<string>\b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[))</string>
 			<key>name</key>
 			<string>support.class.ruby</string>
 		</dict>


More information about the textmate-dev mailing list