Skip to content

Commit 4111a9f

Browse files
committed
Autocorrect Performance/StringIdentifierArgument
1 parent db180d3 commit 4111a9f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/encoding_test.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ class AllEncodingTest < RegularTest
2222
}.freeze
2323

2424
ENC_TESTS.each_pair do |abbr, name|
25-
define_method "test_#{abbr}" do
25+
define_method :"test_#{abbr}" do
2626
require_relative "encoding_test/#{abbr}"
2727
self.class.class_eval { include EncodingTest }
2828

29-
str = send("#{abbr}_string")
29+
str = send(:"#{abbr}_string")
3030

3131
assert_equal name, str.encoding.to_s
3232

33-
ast = EncodingTest.instance_method("#{abbr}_string").to_ast
33+
ast = EncodingTest.instance_method(:"#{abbr}_string").to_ast
3434

3535
assert_equal "UTF-8", no_arg_def_return(ast).encoding.to_s
3636

3737
LiveAST.load "./test/encoding_test/#{abbr}.rb"
3838

39-
ast = EncodingTest.instance_method("#{abbr}_string").to_ast
39+
ast = EncodingTest.instance_method(:"#{abbr}_string").to_ast
4040

4141
assert_equal "UTF-8", no_arg_def_return(ast).encoding.to_s
4242
end

test/test_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def assert_nothing_raised
4242
empty equal in_delta in_epsilon includes instance_of
4343
kind_of match nil operator respond_to same
4444
).each { |name|
45-
alias_method "assert_not_#{name}", "refute_#{name}"
45+
alias_method :"assert_not_#{name}", "refute_#{name}"
4646
}
4747
end
4848

0 commit comments

Comments
 (0)