Permalink
Browse files

Report the correct size when body wasn't a string.

  • Loading branch information...
Keith Rarick
Keith Rarick committed Jul 15, 2008
1 parent b387f01 commit d49d2424bdaa80e68dd83b11ab1dea723605b91e
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/beanstalk-client/connection.rb
@@ -50,6 +50,7 @@ def close
end
def put(body, pri=65536, delay=0, ttr=120)
+ body = body.to_s # Make sure that body.size gives a useful number
interact("put #{pri} #{delay} #{ttr} #{body.size}\r\n#{body}\r\n",
%w(INSERTED BURIED))[0].to_i
end

0 comments on commit d49d242

Please sign in to comment.