ruby-changes:18610
From: tenderlove <ko1@a...>
Date: Sun, 23 Jan 2011 07:46:52 +0900 (JST)
Subject: [ruby-changes:18610] Ruby:r30634 (trunk): reverting r30628 since this seems like a bug in libyaml
tenderlove 2011-01-23 07:43:41 +0900 (Sun, 23 Jan 2011) New Revision: 30634 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30634 Log: reverting r30628 since this seems like a bug in libyaml Modified files: trunk/ChangeLog trunk/ext/psych/parser.c trunk/test/psych/test_parser.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30633) +++ ChangeLog (revision 30634) @@ -18,13 +18,6 @@ * test/psych/test_merge_keys.rb: test for merge keys -Sat Jan 22 11:21:40 2011 Aaron Patterson <aaron@t...> - - * 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@t...> * ext/psych/parser.c (parse): add the file name to the exception when Index: ext/psych/parser.c =================================================================== --- ext/psych/parser.c (revision 30633) +++ ext/psych/parser.c (revision 30634) @@ -95,7 +95,7 @@ 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)) Index: test/psych/test_parser.rb =================================================================== --- test/psych/test_parser.rb (revision 30633) +++ test/psych/test_parser.rb (revision 30634) @@ -155,21 +155,6 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/