lib/yard/code_objects/base.rb in yard-0.8.7.6 vs lib/yard/code_objects/base.rb in yard-0.9.0
- old
+ new
@@ -47,14 +47,17 @@
CSEPQ = Regexp.quote CSEP
# Regular expression to match constant name
CONSTANTMATCH = /[A-Z]\w*/
+ # Regular expression to match the beginning of a constant
+ CONSTANTSTART = /^[A-Z]/
+
# Regular expression to match namespaces (const A or complex path A::B)
NAMESPACEMATCH = /(?:(?:#{NSEPQ}\s*)?#{CONSTANTMATCH})+/
# Regular expression to match a method name
- METHODNAMEMATCH = /[a-zA-Z_]\w*[!?=]?|[-+~]\@|<<|>>|=~|===?|<=>|[<>]=?|\*\*|[-\/+%^&*~`|]|\[\]=?/
+ METHODNAMEMATCH = /[a-zA-Z_]\w*[!?=]?|[-+~]\@|<<|>>|=~|===?|![=~]?|<=>|[<>]=?|\*\*|[-\/+%^&*~`|]|\[\]=?/
# Regular expression to match a fully qualified method def (self.foo, Class.foo).
METHODMATCH = /(?:(?:#{NAMESPACEMATCH}|[a-z]\w*)\s*(?:#{CSEPQ}|#{NSEPQ})\s*)?#{METHODNAMEMATCH}/
# All builtin Ruby exception classes for inheritance tree.