[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] compat_onenine: simplify pipe wrapper
From: |
Eric Wong |
Subject: |
[PATCH] compat_onenine: simplify pipe wrapper |
Date: |
Mon, 8 Dec 2014 07:00:44 +0000 |
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
--
EW
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] compat_onenine: simplify pipe wrapper,
Eric Wong <=