Rails/EnumSyntax
autocorrection causes deprecation warning on Ruby 2.7
#1362
Labels
bug
Something isn't working
Rails/EnumSyntax
does the following autocorrection:rubocop-rails/spec/rubocop/cop/rails/enum_syntax_spec.rb
Lines 115 to 124 in 210f42e
However, if you run the autocorrected code in Ruby 2.7, you will get a deprecated warning about the usage of keyword arguments, depending on the warning options (e.g.
-W:deprecated
) and ruby versions.Expected behavior
No warnings should be reported after autocorrection.
In other words, code that originally did not have a deprecation warning should not be changed by autocorrect to a state where a deprecation warning is issued.
Actual behavior
The following warning is reported after its autocorrection:
Steps to reproduce the problem
You can verify that this warning is output by running the following code in Ruby 2.7:
RuboCop version
The text was updated successfully, but these errors were encountered: