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

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
parent 3fac4abc7b
commit 005986bd44
2 changed files with 8 additions and 1 deletions

View file

@ -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.

View file

@ -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 */