diff options
author | Stan Lo <[email protected]> | 2024-07-17 21:42:58 +0100 |
---|---|---|
committer | git <[email protected]> | 2024-07-17 20:43:08 +0000 |
commit | 239d54dfbce0f38cf4d31fa252b4d9bd65477bac (patch) | |
tree | e45982071e39c601d1e200015d71fae2c81876f1 /lib/rdoc/code_object/method_attr.rb | |
parent | 573c2893dce90c3254bfcb496be74b652d1cae29 (diff) |
[ruby/rdoc] Improve rubocop setup
(https://github.com/ruby/rdoc/pull/1139)
* Rename rake rubocop to rake format_generated_files
* Add rubocop rules to ensure spaces are applied consistently
* Improve rubocop related CI workflows
https://github.com/ruby/rdoc/commit/27932d001c
Diffstat (limited to 'lib/rdoc/code_object/method_attr.rb')
-rw-r--r-- | lib/rdoc/code_object/method_attr.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rdoc/code_object/method_attr.rb b/lib/rdoc/code_object/method_attr.rb index 61ddb32f46..27e6599bc1 100644 --- a/lib/rdoc/code_object/method_attr.rb +++ b/lib/rdoc/code_object/method_attr.rb @@ -268,8 +268,8 @@ class RDoc::MethodAttr < RDoc::CodeObject when 'const_get' then 'const' when 'new' then $1.split('::').last. # ClassName => class_name - gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). - gsub(/([a-z\d])([A-Z])/,'\1_\2'). + gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2'). + gsub(/([a-z\d])([A-Z])/, '\1_\2'). downcase else $2 @@ -291,7 +291,7 @@ class RDoc::MethodAttr < RDoc::CodeObject def html_name require 'cgi/util' - CGI.escape(@name.gsub('-', '-2D')).gsub('%','-').sub(/^-/, '') + CGI.escape(@name.gsub('-', '-2D')).gsub('%', '-').sub(/^-/, '') end ## |