1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use %i-literal instead of array of symbols

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-09-07 12:31:50 +00:00
parent 99d989be9e
commit af32570535

View file

@ -85,7 +85,7 @@ class String
split('')
end
(Array.instance_methods - instance_methods - [:to_ary, :transpose, :flatten, :flatten!, :compact, :compact!, :assoc, :rassoc]).each{|meth|
(Array.instance_methods - instance_methods - %i[to_ary transpose flatten flatten! compact compact! assoc rassoc]).each{|meth|
eval "
def #{meth}(*args, &block)
a = to_a