mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use toplevel reference to ::StringIO since we're in a BasicObject.
This commit is contained in:
parent
e73445ba1b
commit
9714a9b001
1 changed files with 2 additions and 2 deletions
|
@ -3,12 +3,12 @@ module ActionController
|
|||
class RewindableIO < ActiveSupport::BasicObject
|
||||
def initialize(io)
|
||||
@io = io
|
||||
@rewindable = io.is_a?(StringIO)
|
||||
@rewindable = io.is_a?(::StringIO)
|
||||
end
|
||||
|
||||
def method_missing(method, *args, &block)
|
||||
unless @rewindable
|
||||
@io = StringIO.new(@io.read)
|
||||
@io = ::StringIO.new(@io.read)
|
||||
@rewindable = true
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue