Skip to content

Commit

Permalink
Fix a false negative for Performance/StringIdentifierArgument
Browse files Browse the repository at this point in the history
This PR fixes a false negative for `Performance/StringIdentifierArgument`
when using `instance_variable_defined?`.

It was due to a typo. I checked other method names and it seems that there is no problem.
  • Loading branch information
koic committed Jul 11, 2022
1 parent 36065b7 commit 9dbfdd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#296](https://github.com/rubocop/rubocop-performance/pull/296): Fix a false negative for `Performance/StringIdentifierArgument` when using `instance_variable_defined?`. ([@koic][])
2 changes: 1 addition & 1 deletion lib/rubocop/cop/performance/string_identifier_argument.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class StringIdentifierArgument < Base
remove_class_variable remove_method undef_method class_variable_get class_variable_set
deprecate_constant module_function private private_constant protected public public_constant
remove_const ruby2_keywords
define_singleton_method instance_variable_defined instance_variable_get instance_variable_set
define_singleton_method instance_variable_defined? instance_variable_get instance_variable_set
method public_method public_send remove_instance_variable respond_to? send singleton_method
__send__
].freeze
Expand Down

0 comments on commit 9dbfdd4

Please sign in to comment.