diff --git a/src/yaml/pull_parser.cr b/src/yaml/pull_parser.cr index f24a8a5182a8..0a6ca208d635 100644 --- a/src/yaml/pull_parser.cr +++ b/src/yaml/pull_parser.cr @@ -260,24 +260,24 @@ class YAML::PullParser # Note: YAML starts counting from 0, we want to count from 1 - def location + def location : {Int32, Int32} {start_line, start_column} end - def start_line : Int - @event.start_mark.line + 1 + def start_line : Int32 + @event.start_mark.line.to_i32 + 1 end - def start_column : Int - @event.start_mark.column + 1 + def start_column : Int32 + @event.start_mark.column.to_i32 + 1 end - def end_line : Int - @event.end_mark.line + 1 + def end_line : Int32 + @event.end_mark.line.to_i32 + 1 end - def end_column : Int - @event.end_mark.column + 1 + def end_column : Int32 + @event.end_mark.column.to_i32 + 1 end private def problem_line_number