summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-08 01:52:07 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-08 01:52:07 +0000
commiteb86296497ee0fe2380bd14251a2ae3760dee6a1 (patch)
treedfe98caf14ff3a47c272b7c977b966a02c2ad1ee /enumerator.c
parent74f424c26af16dcf6b3157c08347c944a1c97454 (diff)
* enumerator.c (append_method): use RARRAY_CONST_PTR().
* enumerator.c (lazy_init_iterator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/enumerator.c b/enumerator.c
index 1c4d507..a3022ce 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -990,7 +990,7 @@ append_method(VALUE obj, VALUE str, ID default_method, VALUE default_args)
}
if (eargs != Qfalse) {
long argc = RARRAY_LEN(eargs);
- VALUE *argv = RARRAY_PTR(eargs);
+ const VALUE *argv = RARRAY_CONST_PTR(eargs); /* WB: no new reference */
if (argc > 0) {
rb_str_buf_cat2(str, "(");
@@ -1336,7 +1336,7 @@ lazy_init_iterator(VALUE val, VALUE m, int argc, VALUE *argv)
if (argc > 0) {
rb_ary_cat(args, argv, argc);
}
- result = rb_yield_values2(len, RARRAY_PTR(args));
+ result = rb_yield_values2(len, RARRAY_CONST_PTR(args));
RB_GC_GUARD(args);
}
if (result == Qundef) rb_iter_break();