ruby-changes:35175
From: nobu <ko1@a...>
Date: Sat, 23 Aug 2014 11:52:37 +0900 (JST)
Subject: [ruby-changes:35175] nobu:r47257 (trunk): ruby.c: reduce RARRAY_PTR_USE region
nobu 2014-08-23 11:52:23 +0900 (Sat, 23 Aug 2014) New Revision: 47257 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47257 Log: ruby.c: reduce RARRAY_PTR_USE region * ruby.c (process_options): reduce RARRAY_PTR_USE region, make the path to be set before entering the region. Modified files: trunk/ruby.c Index: ruby.c =================================================================== --- ruby.c (revision 47256) +++ ruby.c (revision 47257) @@ -1381,8 +1381,9 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1381 long i; VALUE load_path = GET_VM()->load_path; for (i = 0; i < RARRAY_LEN(load_path); ++i) { - RARRAY_ASET(load_path, i, - rb_enc_associate(rb_str_dup(RARRAY_AREF(load_path, i)), lenc)); + VALUE path = RARRAY_AREF(load_path, i); + path = rb_enc_associate(rb_str_dup(path), lenc); + RARRAY_ASET(load_path, i, path); } } Init_ext(); /* load statically linked extensions before rubygems */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/