[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>

Hello,

9 messages 2017/10/04

[ruby-core:83507] [Ruby trunk Bug#13615] YAML parser stops processing at the first newline when byte order mark is present

From: asari.ruby@...
Date: 2017-10-22 14:39:26 UTC
List: ruby-core #83507
Issue #13615 has been updated by hasari (Hiro Asari).


I've opened https://github.com/ruby/psych/issues/331.

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

* 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:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next