aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte
Commit message (Collapse)AuthorAgeFilesLines
* removing unused codeAaron Patterson2010-08-221-1/+1
|
* edit pass to apply API guideline wrt the use of "# =>" in example codeXavier Noria2010-07-302-40/+41
|
* Removes unused varsSantiago Pastorino2010-07-241-6/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Improve bang method defs, make slice! operate in-place. [#5028 state:resolved]Norman Clarke2010-07-081-19/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Improve the idiom used in multibyte chars a bit.José Valim2010-06-301-3/+3
|
* Fix ActiveSupport::Multibyte::Chars#slice for empty strings when starting ↵Alex Muntean2010-06-301-1/+2
| | | | | | offset is negative [#4717 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Update Unicode database to 5.2.0. [#5011 state:resolved]Norman Clarke2010-06-301-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix AS::MB::Chars#+ to not alter self [#4646 state:resolved]James MacAulay2010-06-301-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move some methods into 1.8.x-only proxy. [#4978 state:resolved]Norman Clarke2010-06-261-40/+39
| | | | | | | | These methods had been overridden because they had bugs on 1.9.1. Since Rails now supports only 1.9.2, and these methods now work properly on that version, there's no longer any need to override them. Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds titleize/titlecase to AS::Multibyte::CharsNorman Clarke2010-06-201-0/+10
| | | | | | [#2794 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* <=> is defined twice on multibyte/chars.rb for Ruby < 1.9Sam Elliott and Santiago Pastorino2010-06-201-14/+10
| | | | | | [#4850 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Explicitly delegate Chars#<=> to work around Kernel#<=> possibly ignoring ↵Jeremy Kemper2010-06-111-3/+4
| | | | method_missing
* Move the undef into the 1.9 only branchwycats2010-06-071-2/+2
|
* If we undef <=>, it solves a problem involving comparison. Please figure out ↵wycats2010-06-071-0/+2
| | | | the root cause.
* Use multibyte proxy class on 1.9, refactor Unicode.Norman Clarke2010-05-213-507/+534
| | | | | | | | | | Makes String#mb_chars on Ruby 1.9 return an instance of ActiveSupport::Multibyte::Chars to work around 1.9's lack of Unicode case folding. Refactors class methods from ActiveSupport::Multibyte::Chars into new Unicode module, adding other related functionality for consistency. [#4594 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Delegate Inflector.transliterate to i18n. [#4508 state:resolved]Norman Clarke2010-04-301-18/+27
| | | | | | | Ancillary changes: Moved Chars#normalize into a class method; removed unused UTF_PAT constant. Signed-off-by: José Valim <jose.valim@gmail.com>
* Action Pack: fix tests with -K*, work around Ruby 1.9.1 constant lookup.Cezary Baginski2010-04-251-2/+2
| | | | | | [#4473 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make tidy_bytes work on 1.9 and improve its performance. [#4350 state:resolved]Norman Clarke2010-04-091-18/+67
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Improve performance of multibyte utils.James Golick2010-03-161-1/+1
| | | | | | | 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>
* Merge docrailsPratik Naik2010-01-171-1/+1
|
* Fix unresolved string extension dependenciesJeremy Kemper2009-11-081-2/+3
|
* Make ActiveSupport::Chars#limit run on Ruby 1.9.Manfred Stienstra2009-11-041-0/+5
|
* Improve performance of Multibyte::Utils.Manfred Stienstra2009-11-041-7/+6
| | | | | | Replace explicit for-loops by faster enumeration methods. [#3158 state:committed]
* Add ActiveSupport::Multibyte::Chars#limit.Manfred Stienstra2009-11-041-14/+15
| | | | | | | | | | The limit method limits the number of bytes in a string. Useful when the storage space of the string is limited, for instance in a database column definition. Sharpen up the implementation of translate offset. [#3192 state:committed]
* Fix chars.reverse for multibyte decomposed stringsMatias Flores2009-11-021-1/+1
| | | | | | [#597 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use Encoding.default_external, not _internalJeremy Kemper2009-09-131-2/+2
|
* Remove redundant checks for valid character regexp in ↵Beau Harrington2009-09-101-2/+2
| | | | | | | | ActiveSupport::Multibyte#clean and #verify. [#3181 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add verify and clean methods to ActiveSupport::Multibyte.Michael Koziarski2009-09-042-16/+68
| | | | | | | | | | | | 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
* Correctly handle offsets in Multibyte::Chars#index and #rindex.Erik Ostrom2009-08-091-3/+5
| | | | | | | | The offset in codepoints was being passed directly to the wrapped string's index/rindex method. Now we translate the offset into bytes first. [#3028 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add rindex to ActiveSupport::Multibyte::Chars.Erik Ostrom2009-08-091-0/+13
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Include acts_as_string?Jeremy Kemper2009-05-181-0/+1
|
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-2/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
| * Make Chars#slice! behave more like String#slice! [#1243 state:resolved]George Ogata2009-03-071-2/+14
| | | | | | | | | | | | | | - Chars#slice! now returns the slice instead of itself - Chars#slice! now removes the slice from itself Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Ruby 1.9: force ascii encoding for comparison with utf8 regexpJeremy Kemper2009-02-031-0/+2
| |
| * Inline code comments for class_eval/module_eval [#1657 state:resolved]Xavier Noria2008-12-281-4/+4
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Annotated metaprogramming code across ActiveSupportMichael S. Klishin2008-12-281-5/+5
|/
* Add ActiveSupport::Multibyte::Chars#ord method so that it returns correct ↵Jason Cheow2008-12-081-0/+8
| | | | | | | | Unicode value instead of falling back on String#ord in CoreExtensions, which is not multibyte compatible [#1483 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge with docrails. Also add a rake task to generate guides in your rails ↵Pratik Naik2008-10-211-2/+2
| | | | | | | | application : rake doc:guides The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
* Add tests for u_unpack to make sure it raises an EncodingError on invalid ↵Manfred Stienstra2008-09-211-1/+1
| | | | UTF-8 strings.
* Non-string results from forwarded methods should be returned vertabim.Manfred Stienstra2008-09-211-2/+3
|
* Improve documentation.Manfred Stienstra2008-09-212-52/+62
|
* All methods which normally return a string now return a proxy instance.Manfred Stienstra2008-09-211-2/+1
|
* Change all calls to String#chars to String#mb_chars.Manfred Stienstra2008-09-211-10/+10
|
* Simplify ActiveSupport::Multibyte and make it run on Ruby 1.9.Manfred Stienstra2008-09-217-892/+733
| | | | | | * Unicode methods are now defined directly on Chars instead of a handler * Updated Unicode database to Unicode 5.1.0 * Improved documentation
* Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars ↵Manfred Stienstra2008-09-111-0/+5
| | | | | | | | | | values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1029 state:committed]
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Ruby 1.8.7 compat: TimeWithZone# and Chars#respond_to? pass along the ↵Jeremy Kemper2008-05-311-5/+7
| | | | include_private argument
* Merge docrails.Pratik Naik2008-05-252-11/+9
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation coverage and markupXavier Noria2008-05-021-1/+3
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Multibyte: String#chars returns self for Ruby 1.9Jeremy Kemper2007-12-211-8/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de