From 6d891b395d1614d6d00a5c405997c1e6d7c4671f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 8 Dec 2014 06:58:02 +0000 Subject: compat_onenine: simplify pipe wrapper Array#each already returns the array, so there's no need to use the more confusing Array#map! block --- lib/dtas/compat_onenine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtas/compat_onenine.rb b/lib/dtas/compat_onenine.rb index 568491b..e789114 100644 --- a/lib/dtas/compat_onenine.rb +++ b/lib/dtas/compat_onenine.rb @@ -12,6 +12,6 @@ end unless String.method_defined?(:b) def IO # :nodoc: def self.pipe # :nodoc: - super.map! { |io| io.close_on_exec = true; io } + super.each { |io| io.close_on_exec = true } end end if RUBY_VERSION.to_f <= 1.9 -- cgit v1.2.3-24-ge0c7