mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* string.c (rb_str_aset): index double decode problem.
[ruby-core:09695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									a7784d0048
								
							
						
					
					
						commit
						f70c171f8c
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Mon Dec 11 09:36:29 2006  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* string.c (rb_str_aset): index double decode problem.
 | 
			
		||||
	  [ruby-core:09695]
 | 
			
		||||
 | 
			
		||||
Sat Dec  9 21:39:24 2006  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* eval.c (ruby_cleanup): keep the exception till after END blocks.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								string.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								string.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1811,8 +1811,8 @@ rb_str_aset(VALUE str, VALUE indx, VALUE val)
 | 
			
		|||
 | 
			
		||||
    switch (TYPE(indx)) {
 | 
			
		||||
      case T_FIXNUM:
 | 
			
		||||
      num_index:
 | 
			
		||||
	idx = FIX2LONG(indx);
 | 
			
		||||
      num_index:
 | 
			
		||||
	if (RSTRING_LEN(str) <= idx) {
 | 
			
		||||
	  out_of_range:
 | 
			
		||||
	    rb_raise(rb_eIndexError, "index %ld out of string", idx);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue