1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

reverting r30628 since this seems like a bug in libyaml

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2011-01-22 22:43:41 +00:00
parent 8135c466ec
commit 18e3c52bc4
3 changed files with 1 additions and 23 deletions

View file

@ -18,13 +18,6 @@ Sat Jan 22 11:33:04 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* test/psych/test_merge_keys.rb: test for merge keys
Sat Jan 22 11:21:40 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/parser.c (parse): fixing off-by-one error on line numbers
in parse exceptions. [ruby-core:34690]
* test/psych/test_parser.rb: test for error
Sat Jan 22 10:25:19 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/parser.c (parse): add the file name to the exception when

View file

@ -95,7 +95,7 @@ static VALUE parse(VALUE self, VALUE yaml)
while(!done) {
if(!yaml_parser_parse(parser, &event)) {
VALUE path;
size_t line = parser->mark.line + 1;
size_t line = parser->mark.line;
size_t column = parser->mark.column;
if(rb_respond_to(yaml, id_path))

View file

@ -155,21 +155,6 @@ module Psych
assert_match "(#{io.path}):", e.message
end
# ruby-core:34690
def test_exception_line
e = assert_raises(Psych::SyntaxError) do
@parser.parse(<<-eoyaml)
# based on "SGML/XML character entity reference" at http://www.bitjungle.com/isoent/
#
---
#DOUBLE LOW-9 QUOTATION MARK
#requires fontenc:T1
ldquor: ,,
eoyaml
end
assert_match 'line 6', e.message
end
def test_mapping_end
@parser.parse("---\n!!map { key: value }")
assert_called :end_mapping