[PATCH] Rack::Utils.bytesize
Reported by Ryan Tomayko | March 6th, 2009 @ 07:25 PM | in 1.0
Add a bytesize
method to Rack::Utils and replaces
all occurances of the following idiom:
size = string.respond_to?(:bytesize) ? string.bytesize : string.size
with
Rack::Utils.bytesize(string)
Whether to use bytesize or size on Strings is determined at load time instead of each time a size is needed. This should be a bit faster and easier to look at.
Comments and changes to this ticket
-
Ryan Tomayko March 6th, 2009 @ 07:26 PM
- no changes were found...
-
Ryan Tomayko March 6th, 2009 @ 09:56 PM
- Milestone set to 1.0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Attachments
Referenced by
- 35 [PATCH] Automatic Content-Length and Transfer-Encoding: chunked handling This also needs #34 (Rack::Utils.bytesize) but that could...