Permalink
Browse files

fix whitespace errors in rewindable_input.rb

  • Loading branch information...
1 parent 01532da commit 8ec26961a6edf79c1a0c730a58e5d095b8bcecdf @rtomayko rtomayko committed Feb 22, 2010
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/rack/rewindable_input.rb
@@ -16,27 +16,27 @@ def initialize(io)
@rewindable_io = nil
@unlinked = false
end
-
+
def gets
make_rewindable unless @rewindable_io
@rewindable_io.gets
end
-
+
def read(*args)
make_rewindable unless @rewindable_io
@rewindable_io.read(*args)
end
-
+
def each(&block)
make_rewindable unless @rewindable_io
@rewindable_io.each(&block)
end
-
+
def rewind
make_rewindable unless @rewindable_io
@rewindable_io.rewind
end
-
+
# Closes this RewindableInput object without closing the originally
# wrapped IO oject. Cleans up any temporary resources that this RewindableInput
# has created.
@@ -52,9 +52,9 @@ def close
@rewindable_io = nil
end
end
-
+
private
-
+
# Ruby's Tempfile class has a bug. Subclass it and fix it.
class Tempfile < ::Tempfile
def _close
@@ -78,7 +78,7 @@ def make_rewindable
@rewindable_io.unlink
@unlinked = true
end
-
+
buffer = ""
while @io.read(1024 * 4, buffer)
entire_buffer_written_out = false
@@ -92,7 +92,7 @@ def make_rewindable
end
@rewindable_io.rewind
end
-
+
def filesystem_has_posix_semantics?
RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/
end

0 comments on commit 8ec2696

Please sign in to comment.