Skip to content
Browse files

reliably convert body to a string

  • Loading branch information...
1 parent 800ceca commit 7c69d64a702c4d6cb8b7bbedecefe37528db8c5d @kr kr committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/beanstalk-client/connection.rb
View
2 lib/beanstalk-client/connection.rb
@@ -53,7 +53,7 @@ def put(body, pri=65536, delay=0, ttr=120)
pri = pri.to_i
delay = delay.to_i
ttr = ttr.to_i
- body = body.to_s # Make sure that body.size gives a useful number
+ body = "#{body}" # 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 7c69d64

Please sign in to comment.
Something went wrong with that request. Please try again.