diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-23 13:40:15 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-23 15:26:29 +0900 |
commit | 70a459986988fecf245cf5eb62e7982e790c8260 (patch) | |
tree | 3b3025402039f605c9e9295fa64561f908eced19 /ext/psych/yaml/parser.c | |
parent | 666c077691a5521cb82254911f0abb9575cac9a1 (diff) | |
download | ruby-70a459986988fecf245cf5eb62e7982e790c8260.tar.gz |
[ruby/psych] Bump libyaml version to 0.2.5
https://github.com/ruby/psych/commit/39996192cc
Diffstat (limited to 'ext/psych/yaml/parser.c')
-rw-r--r-- | ext/psych/yaml/parser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/psych/yaml/parser.c b/ext/psych/yaml/parser.c index 621f676bf2..ec2f8d3e05 100644 --- a/ext/psych/yaml/parser.c +++ b/ext/psych/yaml/parser.c @@ -1261,7 +1261,10 @@ yaml_parser_process_directives(yaml_parser_t *parser, goto error; } if (token->data.version_directive.major != 1 - || token->data.version_directive.minor != 1) { + || ( + token->data.version_directive.minor != 1 + && token->data.version_directive.minor != 2 + )) { yaml_parser_set_parser_error(parser, "found incompatible YAML document", token->start_mark); goto error; @@ -1316,6 +1319,8 @@ yaml_parser_process_directives(yaml_parser_t *parser, STACK_DEL(parser, tag_directives); } + if (!version_directive_ref) + yaml_free(version_directive); return 1; error: |