We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0485fe0 commit cd3582fCopy full SHA for cd3582f
lib/cramp/controller/body.rb
@@ -30,7 +30,7 @@ def flush
30
return unless @body_callback
31
32
until @queue.empty?
33
- @queue.shift.each {|chunk| @body_callback.call(chunk) }
+ Array(@queue.shift).each {|chunk| @body_callback.call(chunk) }
34
end
35
36
@@ -40,7 +40,7 @@ def schedule_dequeue
40
EventMachine.next_tick do
41
next unless body = @queue.shift
42
43
- body.each {|chunk| @body_callback.call(chunk) }
+ Array(body).each {|chunk| @body_callback.call(chunk) }
44
schedule_dequeue unless @queue.empty?
45
46
0 commit comments