mirror of
https://github.com/github/rails.git
synced 2026-02-14 16:15:16 -05:00
Change all calls to String#chars to String#mb_chars. Remove a exception for Ruby <= 1.9.
This commit is contained in:
4
activerecord/test/cases/base_test.rb
Normal file → Executable file
4
activerecord/test/cases/base_test.rb
Normal file → Executable 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"
|
||||
|
||||
Reference in New Issue
Block a user