mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									01606c71de
								
							
						
					
					
						commit
						e2418c39bd
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		
							
								
								
									
										5
									
								
								ruby.c
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								ruby.c
									
										
									
									
									
								
							|  | @ -1381,8 +1381,9 @@ process_options(int argc, char **argv, struct cmdline_options *opt) | |||
| 	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 */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu