[#81492] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — normalperson@...

Issue #13618 has been reported by normalperson (Eric Wong).

12 messages 2017/06/01

[ruby-core:81496] [Ruby trunk Bug#13615][Third Party's Issue] YAML parser stops processing at the first newline when byte order mark is present

From: hsbt@...
Date: 2017-06-01 03:45:41 UTC
List: ruby-core #81496
Issue #13615 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Open to Third Party's Issue
Assignee set to hsbt (Hiroshi SHIBATA)
Target version set to 2.5

Could you file this issue to https://github.com/ruby/psych ?

----------------------------------------
Bug #13615: YAML parser stops processing at the first newline when byte order mark is present
https://bugs.ruby-lang.org/issues/13615#change-65206

* Author: hasari (Hiro Asari)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 2.5
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
When the input has byte order mark, the YAML parser stops processing the input upon seeing the first newline.

I believe this is a violation of YAML specification. [[http://www.yaml.org/spec/1.2/spec.html#id2771184]]

~~~
[1] pry(main)> RUBY_DESCRIPTION
=> "ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]"
[2] pry(main)> require 'yaml'
=> true
[3] pry(main)> YAML.load("a: b\nc: d")
=> {"a"=>"b", "c"=>"d"}
[4] pry(main)> YAML.load("\xEF\xBB\xBF" + "a: b\nc: d")
=> {"a"=>"b"}
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next