Skip to content
Browse files

IO.open accepts same number of parameters as self.new now.

  • Loading branch information...
1 parent ef45de4 commit d2baff384a44cc0e24e5455539e47d7e8aca67de @tsahara tsahara committed Aug 30, 2013
Showing with 0 additions and 16 deletions.
  1. +0 −16 mrblib/tempfile.rb
View
16 mrblib/tempfile.rb
@@ -18,22 +18,6 @@ def initialize(basename, tempdir = Dir::tmpdir)
self
end
- def self.open(basename, tempdir = Dir::tmpdir, &block)
- tempfile = self.new(basename, tempdir)
-
- return tempfile unless block
-
- begin
- yield tempfile
- ensure
- begin
- tempfile.close unless tempfile.closed?
- rescue => e
- end
- end
-
- end
-
def self.delete_all
while not @@tempfiles.empty?
@@tempfiles.shift.delete

0 comments on commit d2baff3

Please sign in to comment.
Something went wrong with that request. Please try again.