io-manage 0.0.1 → 0.0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/io/manage.rb +6 -2
- metadata +1 -1
data/lib/io/manage.rb
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
|
11
11
|
class IO
|
12
12
|
def suppress
|
13
|
-
old = IO.pipe
|
13
|
+
_, old = IO.pipe
|
14
|
+
old.reopen(self)
|
15
|
+
_.close
|
14
16
|
self.reopen(IO.pipe.last)
|
15
17
|
|
16
18
|
yield
|
@@ -20,7 +22,9 @@ class IO
|
|
20
22
|
end
|
21
23
|
|
22
24
|
def catch
|
23
|
-
old = IO.pipe
|
25
|
+
_, old = IO.pipe
|
26
|
+
old.reopen(self)
|
27
|
+
_.close
|
24
28
|
pip = IO.pipe
|
25
29
|
|
26
30
|
begin
|