summaryrefslogtreecommitdiff
path: root/test/psych/test_scalar.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-14 06:15:58 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-14 06:15:58 +0000
commit0b396d588060707e227f21b80e964180674c8a50 (patch)
tree9164cd8f79f9e9b317dad2b399778e47b410cae1 /test/psych/test_scalar.rb
parente870af8834bd3cb4aded02c6e63a4b817e4648b5 (diff)
downloadruby-0b396d588060707e227f21b80e964180674c8a50.tar.gz
Merge psych-3.0.0.beta3 from ruby/psych.
* Rely on encoding tags to determine if string should be dumped as binary. https://github.com/ruby/psych/commit/8949a47b8cee31e03e21608406ba116adcf74054 * Specify "frozen_string_literal: true". * Support to binary release for mingw32 platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_scalar.rb')
-rw-r--r--test/psych/test_scalar.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/psych/test_scalar.rb b/test/psych/test_scalar.rb
index 4353ec33fa..e2f9ec791d 100644
--- a/test/psych/test_scalar.rb
+++ b/test/psych/test_scalar.rb
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# frozen_string_literal: false
+# frozen_string_literal: true
require_relative 'helper'
@@ -8,5 +8,10 @@ module Psych
def test_utf_8
assert_equal "日本語", Psych.load("--- 日本語")
end
+
+ def test_some_bytes # Ticket #278
+ x = "\xEF\xBF\xBD\x1F"
+ assert_cycle x
+ end
end
end