#34 ✓resolved
Ryan Tomayko

[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

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.

New-ticket Create new ticket

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

Pages