From 3c5e36cd57fa32c85afe26d47a5a7d2314a7360a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Nov 2014 03:53:46 +0000 Subject: config: use literal symbol array for now Until we drop 1.9.3 support, we'll save some bytecode by using [ :literal, :symbols, :in, :arrays ] In 2.0.0 and later, we may use %i(terser syntax) --- lib/yahns/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb index 3055539..f354961 100644 --- a/lib/yahns/config.rb +++ b/lib/yahns/config.rb @@ -402,7 +402,7 @@ class Yahns::Config # :nodoc: val.close_on_exec = val.sync = true val.binmode else - rt = %w(puts write flush).map(&:to_sym) # match Rack::Lint + rt = [ :puts, :write, :flush ] # match Rack::Lint rt.all? { |m| val.respond_to?(m) } or raise ArgumentError, "`#{var}' destination must respond to all of: #{rt.inspect}" end -- cgit v1.2.3-24-ge0c7