1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

string.c: fix r58618

* string.c (unicode_normalize_common): aggregation type cannot be
  initialized with dynamic values, in C89.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-05-09 14:11:46 +00:00
parent a4301ec214
commit 208240870a

View file

@ -9592,12 +9592,13 @@ static VALUE
unicode_normalize_common(int argc, VALUE *argv, VALUE str, ID id)
{
static int UnicodeNormalizeRequired = 0;
VALUE argv2[2] = { str };
VALUE argv2[2];
if (!UnicodeNormalizeRequired) {
rb_require("unicode_normalize/normalize.rb");
UnicodeNormalizeRequired = 1;
}
argv2[0] = str;
rb_scan_args(argc, argv, "01", &argv2[1]);
return rb_funcallv(mUnicodeNormalize, id, argc+1, argv2);
}