ruby-changes:21354
From: tenderlove <ko1@a...>
Date: Wed, 5 Oct 2011 01:53:27 +0900 (JST)
Subject: [ruby-changes:21354] tenderlove:r33403 (trunk): * ext/psych/parser.c (parse): Use context_mark for indicating error
tenderlove 2011-10-05 01:53:14 +0900 (Wed, 05 Oct 2011) New Revision: 33403 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33403 Log: * ext/psych/parser.c (parse): Use context_mark for indicating error line and column. Modified files: trunk/ChangeLog trunk/ext/psych/parser.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33402) +++ ChangeLog (revision 33403) @@ -1,3 +1,8 @@ +Wed Oct 5 01:52:16 2011 Aaron Patterson <aaron@t...> + + * ext/psych/parser.c (parse): Use context_mark for indicating error + line and column. + Wed Oct 5 01:22:08 2011 Aaron Patterson <aaron@t...> * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue Index: ext/psych/parser.c =================================================================== --- ext/psych/parser.c (revision 33402) +++ ext/psych/parser.c (revision 33403) @@ -99,8 +99,8 @@ while(!done) { if(!yaml_parser_parse(parser, &event)) { VALUE path; - size_t line = parser->mark.line; - size_t column = parser->mark.column; + size_t line = parser->context_mark.line + 1; + size_t column = parser->context_mark.column + 1; if(rb_respond_to(yaml, id_path)) path = rb_funcall(yaml, id_path, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/