1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

5 commits

Author SHA1 Message Date
James Golick
67d8b9743a Improve performance of multibyte utils.
Switch from using String#match to using String#=~. There's no need to
generate a MatchData for each iteration since we're not using it.

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 10:04:20 -07:00
Manfred Stienstra
62a022891b Improve performance of Multibyte::Utils.
Replace explicit for-loops by faster enumeration methods.

[#3158 state:committed]
2009-11-04 10:12:06 +01:00
Jeremy Kemper
91ffddca57 Use Encoding.default_external, not _internal 2009-09-13 04:43:41 -07:00
Beau Harrington
38d65b03d6 Remove redundant checks for valid character regexp in ActiveSupport::Multibyte#clean and #verify.
[#3181 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-10 17:36:54 -07:00
Michael Koziarski
9a73630d93 Add verify and clean methods to ActiveSupport::Multibyte.
When accepting character input from outside of your application you can't
blindly trust that all strings are properly encoded. With these methods
you can check incoming strings and clean them up if necessary.

Signed-off-by: Michael Koziarski <michael@koziarski.com>

Conflicts:

	activesupport/lib/active_support/multibyte.rb
2009-09-04 09:25:38 +12:00