Permalink
Browse files

fix half-fix

  • Loading branch information...
1 parent 3b6ccf7 commit 3f3e8f074318337a2e848a58ba5f620d391ec41b @ninjudd ninjudd committed Aug 2, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 client/ruby/portal.rb
@@ -15,12 +15,13 @@ def initialize(port, host = "localhost")
Thread.new do
while (message = receive_message)
id, type, content = message
+ context = context(id)
if ["stdout", "stderr"].include?(type)
- out = context(id)[type.to_sym][1]
+ out = context[type.to_sym][1]
out.write(content)
out.flush
elsif ["result", "error", "read-error"].include?(type)
- context(id)[:results] << [type, content]
+ context[:results][context[:count]] = [type, content]
else
raise ProtocolError, "unknown message type: #{type}"
end

0 comments on commit 3f3e8f0

Please sign in to comment.