Decode hexadecimal-encoded literals in order to be frozen string literals friendly (#31004).

Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@17991 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2019-03-19 15:43:55 +00:00
parent 7d2f10ccac
commit 26509e7f4c
31 changed files with 143 additions and 218 deletions

View File

@@ -37,7 +37,7 @@ class ApplicationHelperTest < Redmine::HelperTest
def setup
super
set_tmp_attachments_directory
@russian_test = "\xd1\x82\xd0\xb5\xd1\x81\xd1\x82".force_encoding('UTF-8')
@russian_test = 'тест'
end
test "#link_to_if_authorized for authorized user should allow using the :controller and :action for the target link" do
@@ -1792,7 +1792,7 @@ RAW
end
def test_truncate_single_line_non_ascii
ja = "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e".force_encoding('UTF-8')
ja = '日本語'
result = truncate_single_line_raw("#{ja}\n#{ja}\n#{ja}", 10)
assert_equal "#{ja} #{ja}...", result
assert !result.html_safe?