troessner / reek

Code smell detector for Ruby
https://github.com/troessner/reek
MIT License
4k stars 279 forks source link

Support Ruby 3.0 and up #1755

Closed mvz closed 6 months ago

mvz commented 6 months ago
mvz commented 6 months ago

WTF!?

irb(main):001> RUBY_VERSION
=> "3.3.0"
irb(main):002> name = "UncommunicativeMethodName"
=> "UncommunicativeMethodName"
irb(main):003> name.split(/ *(?=[A-Z][a-z])/)
=> ["UncommunicativeMethodName"]
irb(main):004> name = "UncommunicativeParameterName"
=> "UncommunicativeParameterName"
irb(main):005> name.split(/ *(?=[A-Z][a-z])/)
=> ["Uncommunicative", "Parameter", "Name"]
mvz commented 6 months ago

Seems related to this: https://bugs.ruby-lang.org/issues/20095

mvz commented 6 months ago

I'm going to open another PR first to fix support for Ruby 3.3. After that, we can decide about Ruby 2.7.