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

* array.c (rb_ary_aset): fixed arguments evaluation order.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-01-26 07:00:43 +00:00
parent 5225998612
commit c330fb421e
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Mon Jan 26 16:00:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (rb_ary_aset): fixed arguments evaluation order.
Mon Jan 26 15:49:42 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/pathname.rb (chop_basename, prepend_prefix): use o option.

View file

@ -1270,7 +1270,9 @@ rb_ary_aset(int argc, VALUE *argv, VALUE ary)
long offset, beg, len;
if (argc == 3) {
rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
beg = NUM2LONG(argv[0]);
len = NUM2LONG(argv[1]);
rb_ary_splice(ary, beg, len, argv[2]);
return argv[2];
}
if (argc != 2) {