diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-04 23:22:21 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-04 23:22:21 +0900 |
commit | c7b832730158da5372aeeff512508b2eab4e6fcc (patch) | |
tree | e27364f1710f94418cbfcc1fc579cd9609c35208 /activesupport/test | |
parent | cb86b95b609c8aa52411322f5a8e0f128696e068 (diff) | |
parent | 7b44ffa21efe3b9608254701ffdf44f743b1a324 (diff) | |
download | rails-c7b832730158da5372aeeff512508b2eab4e6fcc.tar.gz rails-c7b832730158da5372aeeff512508b2eab4e6fcc.tar.bz2 rails-c7b832730158da5372aeeff512508b2eab4e6fcc.zip |
Merge pull request #31049 from gwincr11/cg-blank
Add support for multiple encodings in String.blank?
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/object/blank_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/object/blank_test.rb b/activesupport/test/core_ext/object/blank_test.rb index 749e59ec00..35a3e5922e 100644 --- a/activesupport/test/core_ext/object/blank_test.rb +++ b/activesupport/test/core_ext/object/blank_test.rb @@ -16,8 +16,8 @@ class BlankTest < ActiveSupport::TestCase end end - BLANK = [ EmptyTrue.new, nil, false, "", " ", " \n\t \r ", " ", "\u00a0", [], {} ] - NOT = [ EmptyFalse.new, Object.new, true, 0, 1, "a", [nil], { nil => 0 }, Time.now ] + BLANK = [ EmptyTrue.new, nil, false, "", " ", " \n\t \r ", " ", "\u00a0", [], {}, " ".encode("UTF-16LE")] + NOT = [ EmptyFalse.new, Object.new, true, 0, 1, "a", [nil], { nil => 0 }, Time.now , "my value".encode("UTF-16LE")] def test_blank BLANK.each { |v| assert_equal true, v.blank?, "#{v.inspect} should be blank" } |