diff --git a/languages/ruby/highlights.scm b/languages/ruby/highlights.scm index 690a5c7..046fe92 100644 --- a/languages/ruby/highlights.scm +++ b/languages/ruby/highlights.scm @@ -57,7 +57,7 @@ ] @keyword ((identifier) @keyword - (#match? @keyword "^(private|protected|public)$")) + (#any-of? @keyword "private" "protected" "public")) ; Function calls (call @@ -129,7 +129,7 @@ ; Identifiers ((identifier) @constant.builtin - (#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$")) + (#any-of? @constant.builtin "__FILE__" "__LINE__" "__ENCODING__")) (file) @constant.builtin diff --git a/languages/ruby/textobjects.scm b/languages/ruby/textobjects.scm index 390d9f6..071df89 100644 --- a/languages/ruby/textobjects.scm +++ b/languages/ruby/textobjects.scm @@ -10,8 +10,8 @@ (call receiver: (constant) @_class_const method: (identifier) @_class_method - (#match? @_class_const "Class") - (#match? @_class_method "new") + (#eq? @_class_const "Class") + (#eq? @_class_method "new") (do_block (_)+ @class.inside)) @class.around