Yauheni Dakuka

Results 67 comments of Yauheni Dakuka

The main idea of this cop is to prevent skipping precision for datetime fields. I believe that the test above should be written more reliably. ```ruby # bad, another example...

`xspecify` and `specify` should not have a ~reason~ docstring (https://github.com/rubocop/rubocop-rspec/issues/1658) and the following example will be correct if I run rubocop: ```ruby # good specify do pending 'Need to upgrade...

There is the RSpec/FilePath cop. According to this cop, if I have the spec that describes the RewardReferrerJob class (and spec file path is consistent and well-formed), it's ok. ```ruby...

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

The code is from [the first "bad" example](https://docs.rubocop.org/rubocop/cops_style.html#stylemapcompactwithconditionalblock): ## 1 case The condition is `false`. ```ruby require 'benchmark/ips' ARRAY = (1..100).to_a def initial ARRAY.map { |e| false ? e :...

The code is from [the second "bad" example](https://docs.rubocop.org/rubocop/cops_style.html#stylemapcompactwithconditionalblock): ## 1 case The condition is `false`. ```ruby require 'benchmark/ips' ARRAY = (1..100).to_a def initial ARRAY.map do |e| if false e else...

The code is from [the third "bad" example](https://docs.rubocop.org/rubocop/cops_style.html#stylemapcompactwithconditionalblock): ## 1 case The condition is `false`. ```ruby require 'benchmark/ips' ARRAY = (1..100).to_a def initial ARRAY.map do |e| next if false e...

The code is from [the fourth "bad" example](https://docs.rubocop.org/rubocop/cops_style.html#stylemapcompactwithconditionalblock): ## 1 case The condition is `false`. ```ruby require 'benchmark/ips' ARRAY = (1..100).to_a def initial ARRAY.map do |e| e if false end.compact...

Is this related to https://github.com/rubocop/rubocop/issues/12053 ?

I've benchmarked it (ruby 3.3.0). ```console ydakuka@yauhenid:~/ruby-docker-app$ docker run ruby-app ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] Warming up -------------------------------------- slow 12.748k i/100ms fast 20.212k i/100ms Calculating ------------------------------------- slow 135.016k (±...