summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-07 04:20:56 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-07 04:20:56 (GMT)
commit8741a39777e76c31f0bdc7b3dcc4ecb03a4c1784 (patch)
tree8fc6913a4d4159c06b5bf2859c115fdc8eb1c631 /random.c
parent7a23eb1c41414a081662a5f89f35fadb59402759 (diff)
* random.c (random_load): use RARRAY_RAWPTR() instead of
RARRAY_PTR() because there is no new reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/random.c b/random.c
index 5d5a507..6a42e24 100644
--- a/random.c
+++ b/random.c
@@ -627,12 +627,12 @@ random_load(VALUE obj, VALUE dump)
rb_random_t *rnd = get_rnd(obj);
struct MT *mt = &rnd->mt;
VALUE state, left = INT2FIX(1), seed = INT2FIX(0);
- VALUE *ary;
+ const VALUE *ary;
unsigned long x;
rb_check_copyable(obj, dump);
Check_Type(dump, T_ARRAY);
- ary = RARRAY_PTR(dump);
+ ary = RARRAY_RAWPTR(dump);
switch (RARRAY_LEN(dump)) {
case 3:
seed = ary[2];