From 7f5a9f3881acd46f5b96419776eb713c42963af7 Mon Sep 17 00:00:00 2001 From: ktsj Date: Sun, 8 Dec 2013 05:58:17 +0000 Subject: [PATCH] * array.c (rb_ary_shuffle_bang, rb_ary_sample): rename local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ array.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8cc16c857a..f4677b5dc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 8 14:55:12 2013 Kazuki Tsujimoto + + * array.c (rb_ary_shuffle_bang, rb_ary_sample): rename local variables. + Sun Dec 8 13:59:38 2013 Kazuki Tsujimoto * array.c (rb_ary_shuffle_bang, rb_ary_sample): check diff --git a/array.c b/array.c index 12469090be..9a93d7f5f7 100644 --- a/array.c +++ b/array.c @@ -4438,10 +4438,10 @@ rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary) } if (OPTHASH_GIVEN_P(opts)) { - VALUE random; - rb_get_kwargs(opts, keyword_ids, 0, 1, &random); - if (random != Qundef) { - randgen = random; + VALUE rnd; + rb_get_kwargs(opts, keyword_ids, 0, 1, &rnd); + if (rnd != Qundef) { + randgen = rnd; } } rb_check_arity(argc, 0, 0); @@ -4525,10 +4525,10 @@ rb_ary_sample(int argc, VALUE *argv, VALUE ary) } if (OPTHASH_GIVEN_P(opts)) { - VALUE random; - rb_get_kwargs(opts, keyword_ids, 0, 1, &random); - if (random != Qundef) { - randgen = random; + VALUE rnd; + rb_get_kwargs(opts, keyword_ids, 0, 1, &rnd); + if (rnd != Qundef) { + randgen = rnd; } } len = RARRAY_LEN(ary);