everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
* [PATCH] compat_onenine: simplify pipe wrapper
@ 2014-12-08  7:00 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2014-12-08  7:00 UTC (permalink / raw)
  To: dtas-all; +Cc: Eric Wong

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-22  1:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-08  7:00 [PATCH] compat_onenine: simplify pipe wrapper Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).