Change all calls to String#chars to String#mb_chars. Remove a exception for Ruby <= 1.9.

This commit is contained in:
Manfred Stienstra
2008-09-21 17:27:25 +02:00
parent 8abef4fd0d
commit 7329990d86
2 changed files with 43 additions and 89 deletions

4
activerecord/test/cases/base_test.rb Normal file → Executable file
View File

@@ -1442,8 +1442,8 @@ class BasicsTest < ActiveRecord::TestCase
topic = Topic.create(:author_name => str)
assert_equal str, topic.author_name
assert_kind_of ActiveSupport::Multibyte::Chars, str.chars
topic = Topic.find_by_author_name(str.chars)
assert_kind_of ActiveSupport::Multibyte.proxy_class, str.mb_chars
topic = Topic.find_by_author_name(str.mb_chars)
assert_kind_of Topic, topic
assert_equal str, topic.author_name, "The right topic should have been found by name even with name passed as Chars"