patch:Ruby class parser

Tim Harper tim at
Fri Apr 21 01:35:12 UTC 2006

actually, on second note, wait on this patch.

For some reason, the go-to class function will not work on classes with "::" 
in them.  Anyone know why ?


On Thursday 20 April 2006 16:40, Tim Harper wrote:
> Hello,
> Here's a patch to fix the ruby class parser for classes like the following:
> class Community::BaseController < ApplicationController
> It's a very small fix.  It just adds a : to the list of possible colons
> characters for the class name.
> If we wanted to be really strict, we could change the line to the
> following, so kdevelop wouldn't pick up on bad class names, like so:
> QRegExp classre("^\\s*(class|module)\\s+(([A-Z][A-Za-z0-9_]+(\\s*::
> \\s*)*)*)\\s*(<\\s*([A-Z][A-Za-z0-9_:]+))?$");
> But, I decided that added too much complexity, and doesn't really buy us a
> whole lot.  So I opted for the single character patch :)
> please apply this to svn.
> Thanks,
> Tim

More information about the KDevelop-devel mailing list