From 87c742bd385593bfe001dc3247c4a4ae7fc92463 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 6 Jan 2010 17:41:41 -0800 Subject: pure: use Rack::Utils.bytesize instead of String#size hacking the C extension with RSTRING_LEN() is so much easier :P --- lib/clogger/pure.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb index 249733a..0c609ba 100644 --- a/lib/clogger/pure.rb +++ b/lib/clogger/pure.rb @@ -39,7 +39,7 @@ class Clogger def each @body_bytes_sent = 0 @body.each do |part| - @body_bytes_sent += part.size + @body_bytes_sent += Rack::Utils.bytesize(part) yield part end ensure -- cgit v1.2.3-24-ge0c7