ruby-changes:47652
From: kazu <ko1@a...>
Date: Thu, 7 Sep 2017 21:31:55 +0900 (JST)
Subject: [ruby-changes:47652] kazu:r59768 (trunk): Use `%i`-literal instead of array of symbols
kazu 2017-09-07 21:31:50 +0900 (Thu, 07 Sep 2017) New Revision: 59768 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59768 Log: Use `%i`-literal instead of array of symbols Modified files: trunk/golf_prelude.rb Index: golf_prelude.rb =================================================================== --- golf_prelude.rb (revision 59767) +++ golf_prelude.rb (revision 59768) @@ -85,7 +85,7 @@ class String https://github.com/ruby/ruby/blob/trunk/golf_prelude.rb#L85 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/