diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-22 02:23:12 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-22 02:23:12 +0000 |
commit | 7b876e65ed79d9ca4a22f7731a463ee30e35b30b (patch) | |
tree | 3f4701836a55e4af73e30e4761a22c0c341c5234 /ext/psych | |
parent | cab95ab7126e69b6b461c38a342194f833512439 (diff) | |
download | ruby-7b876e65ed79d9ca4a22f7731a463ee30e35b30b.tar.gz |
* 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
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/parser.c b/ext/psych/parser.c index 7bfdf4af90..05b493a853 100644 --- a/ext/psych/parser.c +++ b/ext/psych/parser.c @@ -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; + size_t line = parser->mark.line + 1; size_t column = parser->mark.column; if(rb_respond_to(yaml, id_path)) |