From 414d6cf1d310de8f9eed1263116ad568b05a98ec Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 25 Jul 2019 03:29:41 +0900 Subject: [ruby/psych] Get rid of C90 feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For ruby 2.6 and earlier. https://travis-ci.org/ruby/psych/jobs/562435717#L245-L248 ``` ../../../../ext/psych/psych_parser.c: In function ‘make_exception’: ../../../../ext/psych/psych_parser.c:87:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] VALUE ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError")); ^ ``` https://github.com/ruby/psych/commit/aa457443b8 --- ext/psych/psych_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/psych/psych_parser.c b/ext/psych/psych_parser.c index 6e58611c3c..0fef173729 100644 --- a/ext/psych/psych_parser.c +++ b/ext/psych/psych_parser.c @@ -80,11 +80,12 @@ static VALUE allocate(VALUE klass) static VALUE make_exception(yaml_parser_t * parser, VALUE path) { size_t line, column; + VALUE ePsychSyntaxError; line = parser->context_mark.line + 1; column = parser->context_mark.column + 1; - VALUE ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError")); + ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError")); return rb_funcall(ePsychSyntaxError, rb_intern("new"), 6, path, -- cgit v1.2.3