Skip to content

Commit

Permalink
* ext/psych/parser.c (parse): Use context_mark for indicating error
Browse files Browse the repository at this point in the history
  line and column.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
tenderlove committed Oct 4, 2011
1 parent fccfc4f commit 77e58a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Wed Oct 5 01:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>

* ext/psych/parser.c (parse): Use context_mark for indicating error
line and column.

Wed Oct 5 01:22:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>

* ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue
Expand Down
4 changes: 2 additions & 2 deletions ext/psych/parser.c
Expand Up @@ -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);
Expand Down

0 comments on commit 77e58a3

Please sign in to comment.