Yauheni Dakuka
Yauheni Dakuka
I am not sure that this rule does not conflict with the `Style/ParallelAssignment` [cop](https://docs.rubocop.org/rubocop/cops_style.html#styleparallelassignment).
Done. https://github.com/rubocop/ruby-style-guide/pull/936
@KarlHeitmann there is different behavior here. ```ruby 2.7.6 :001 > config = { root_key: { nested_key: 1 } } => {:root_key=>{:nested_key=>1}} 2.7.6 :002 > config[:root_key][:nested_key] => 1 2.7.6 :003 >...
I think that's not within RuboCop's responsibilities due to different behavior. Additionally, I believe that most Ruby developers are familiar with `Hash#dig`.
@eliotsykes ping :) Could your please merge all ready-made PRs from this repository?
https://github.com/eliotsykes/real-world-rails/pull/7914
https://github.com/eliotsykes/real-world-rails/pull/5396
I've benchmarked it (ruby 3.3.0). 1. [Hash#merge! vs Hash#[]=](https://github.com/fastruby/fast-ruby#hashmerge-vs-hash-code) Test: ```console ydakuka@yauhenid:~/ruby-docker-app$ docker run ruby-app ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] Warming up -------------------------------------- Hash#merge! 3.485k i/100ms Hash#[]= 8.717k i/100ms...
> Are they always interchangeable? If any arguments pass, the matchers will be equal. https://github.com/rspec/rspec-expectations/blob/main/lib/rspec/matchers.rb#L349 > Why one should be used instead of another? In my opinion the `be` matcher...
> Can you prove that by harvesting real-world-rspec? I’d specifically be interested in cases where the argument is not among nil/true/false. @pirj I've searched in `real-world-rspec` and got the following...