From 77e58a3398cde8a0e9b0cb07ffe20e6137efe41c Mon Sep 17 00:00:00 2001 From: tenderlove Date: Tue, 4 Oct 2011 16:53:14 +0000 Subject: * ext/psych/parser.c (parse): Use context_mark for indicating error line and column. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/psych/parser.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e1de32cb9..e52628adce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Oct 5 01:52:16 2011 Aaron Patterson + + * ext/psych/parser.c (parse): Use context_mark for indicating error + line and column. + Wed Oct 5 01:22:08 2011 Aaron Patterson * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue diff --git a/ext/psych/parser.c b/ext/psych/parser.c index e68768f562..f3928a9510 100644 --- a/ext/psych/parser.c +++ b/ext/psych/parser.c @@ -99,8 +99,8 @@ static VALUE parse(VALUE self, VALUE yaml) 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); -- cgit v1.2.3