Yauheni Dakuka

Results 32 comments of Yauheni Dakuka

I have the Dockerfile: ```console FROM ruby:3.3.0-preview3 COPY . /var/www/ruby WORKDIR /var/www/ruby RUN gem install benchmark-ips RUN ruby -v CMD ["ruby", "file.rb"] ```

## 1 case ```ruby require "benchmark/ips" ARRAY = ("a".."zzz").to_a.shuffle.freeze def initial ARRAY.select { |x| x.match?(/regexp/) } end def slow ARRAY.select { |x| x.include?('regexp') } end def fast ARRAY.grep(/regexp/) end Benchmark.ips...

## 2 case ```ruby require "benchmark/ips" ARRAY = ("a".."zzz").to_a.shuffle.freeze def initial ARRAY.reject { |x| x.match?(/regexp/) } end def slow ARRAY.reject { |x| x.include?('regexp') } end def fast ARRAY.grep_v(/regexp/) end Benchmark.ips...

> Naming/PredicateName ? As far as I know, this cop does not check method body, but I propose a cop which should check this.

I've enabled them and tested them again. It gave me several wrong autocorrections. And this rule (https://rubystyle.guide/#squiggly-heredocs) is not implemented.

> Can you share the code samples? I took the snippets from the [doc](https://rubystyle.guide/#squiggly-heredocs). ```ruby class Test class

> It gave me several wrong autocorrections. I have the following code: ```ruby class Test # before def my_method # bad foo(

And the second case of wrong autocorrection. I have the code: ```ruby class Test def my_method query =

## Another case https://github.com/shopify/ruby-style-guide#strings I have the following code: ```ruby # bad def my_method

https://github.com/rubocop/rubocop-rspec/issues/1691