aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-28 16:59:50 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-28 17:06:02 +0900
commit5f30b547c8acbf9086329e9c93a3c77768bfb1ea (patch)
tree2ddb70a4422d568ad6520176187040a34390cf28 /activesupport
parent59deaecc76be1b9dcdc3c4865375287560add1d1 (diff)
downloadrails-5f30b547c8acbf9086329e9c93a3c77768bfb1ea.tar.gz
rails-5f30b547c8acbf9086329e9c93a3c77768bfb1ea.tar.bz2
rails-5f30b547c8acbf9086329e9c93a3c77768bfb1ea.zip
Use Encoding::UTF_8 constant :do_not_litter:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 9b22a305c8..68918b040f 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -269,8 +269,8 @@ class StringInflectionsTest < ActiveSupport::TestCase
end
def test_truncate_multibyte
- assert_equal "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 ...".force_encoding('UTF-8'),
- "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 \354\225\204\353\235\274\353\246\254\354\230\244".force_encoding('UTF-8').truncate(10)
+ assert_equal "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 ...".force_encoding(Encoding::UTF_8),
+ "\354\225\204\353\246\254\353\236\221 \354\225\204\353\246\254 \354\225\204\353\235\274\353\246\254\354\230\244".force_encoding(Encoding::UTF_8).truncate(10)
end
def test_truncate_should_not_be_html_safe