lib/refinements/ios.rb in refinements-7.12.0 vs lib/refinements/ios.rb in refinements-7.13.0
- old
+ new
@@ -12,14 +12,10 @@
end
end
end
refine IO do
- def squelch &block
- self.class.void.then { |void| redirect(void, &block) }
- end
-
def redirect other
return self unless block_given?
backup = dup
reopen other
@@ -27,9 +23,13 @@
reopen backup
end
def reread length = nil, buffer: nil
tap(&:rewind).read length, buffer
+ end
+
+ def squelch &block
+ self.class.void.then { |void| redirect(void, &block) }
end
end
end
end