dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] pure: remove Rack::Utils.bytesize dependency
@ 2016-07-27 22:48 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-07-27 22:48 UTC (permalink / raw)
  To: spew

This method is gone from rack 2.0 and not even necessary in Ruby
1.8.7.  Yes, this breaks compatibility with Ruby 1.8.6 :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 5e7ccfe..77f81b4 100644
--- a/lib/clogger/pure.rb
+++ b/lib/clogger/pure.rb
@@ -53,7 +53,7 @@ class Clogger
   def each
     @body_bytes_sent = 0
     @body.each do |part|
-      @body_bytes_sent += Rack::Utils.bytesize(part)
+      @body_bytes_sent += part.bytesize
       yield part
     end
     self
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-27 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27 22:48 [PATCH] pure: remove Rack::Utils.bytesize dependency Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).