From 4a14d94418dc50b817e4e5811c822a3a07584acf Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 2 Sep 2015 09:50:00 +0000 Subject: * ext/psych/*: merge psych master(8737e5b). It contains following fixes. https://github.com/tenderlove/psych/pull/242 https://github.com/tenderlove/psych/pull/246 [ruby-list:50219] * test/psych/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_encoding.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/psych/test_encoding.rb') diff --git a/test/psych/test_encoding.rb b/test/psych/test_encoding.rb index 517cae2069..544337d4c0 100644 --- a/test/psych/test_encoding.rb +++ b/test/psych/test_encoding.rb @@ -249,6 +249,15 @@ module Psych assert_encodings @utf8, @handler.strings end + def test_dump_non_ascii_string_to_file + Tempfile.create(['utf8', 'yml'], :encoding => 'UTF-8') do |t| + h = {'one' => 'いち'} + Psych.dump(h, t) + t.close + assert_equal h, Psych.load_file(t.path) + end + end + private def assert_encodings encoding, strings strings.each do |str| -- cgit v1.2.3