From 4676e643aae73a39e8ecf848c8c63a4be99e85a6 Mon Sep 17 00:00:00 2001 From: yugui Date: Fri, 28 Jan 2011 02:25:31 +0000 Subject: merges r30628 from trunk into ruby_1_9_2. -- * 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/branches/ruby_1_9_2@30691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/psych/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/psych/parser.c b/ext/psych/parser.c index 0fa02b981f..ca2946e200 100644 --- a/ext/psych/parser.c +++ b/ext/psych/parser.c @@ -75,7 +75,7 @@ static VALUE parse(VALUE self, VALUE yaml) while(!done) { if(!yaml_parser_parse(&parser, &event)) { - size_t line = parser.mark.line; + size_t line = parser.mark.line + 1; size_t column = parser.mark.column; yaml_parser_delete(&parser); -- cgit v1.2.3