Fix Segmentation fault at TestArray#test_aref

* array.c (rb_ary_aref): fix Segmentation fault at TestArray#test_aref
  on x64 mingw. Variable argument of rb_scan_args() should be a pointer
  (VALUE *), but 0 of variable argument seems not equal to null pointer
  on x64 mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shirosaki 2012-11-24 04:01:40 +00:00
Родитель 3fac4abc7b
Коммит 005986bd44
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sat Nov 24 12:28:04 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* array.c (rb_ary_aref): fix Segmentation fault at TestArray#test_aref
on x64 mingw. Variable argument of rb_scan_args() should be a pointer
(VALUE *), but 0 of variable argument seems not equal to null pointer
on x64 mingw.
Sat Nov 24 12:12:41 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* gc.c (wmap_final_func): rename variables to clarify the meaning.

Просмотреть файл

@ -1174,7 +1174,7 @@ rb_ary_aref(int argc, VALUE *argv, VALUE ary)
return rb_ary_subseq(ary, beg, len);
}
if (argc != 1) {
rb_scan_args(argc, argv, "11", 0, 0);
rb_scan_args(argc, argv, "11", NULL, NULL);
}
arg = argv[0];
/* special case - speeding up */