mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	use rb_enc_get to get the encoding of a Regexp object.
* re.c (reg_enc_error): use rb_enc_get to get the encoding of a Regexp object. REGEXP(re)->ptr->enc is the encoding of the regexp engin for patterns and target strings. [ruby-core:23208] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									33151fcfe4
								
							
						
					
					
						commit
						acbb181219
					
				
					 2 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,10 @@
 | 
			
		|||
Sat Jul 18 23:44:59 2009  NARUSE, Yui  <naruse@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* re.c (reg_enc_error): use rb_enc_get to get the encoding of
 | 
			
		||||
	  a Regexp object. REGEXP(re)->ptr->enc is the encoding of the
 | 
			
		||||
	  regexp engin for patterns and target strings.
 | 
			
		||||
	  [ruby-core:23208]
 | 
			
		||||
 | 
			
		||||
Sat Jul 18 17:43:12 2009  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* string.c (rb_str_hash_cmp): got rid of overflow.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								re.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								re.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1181,7 +1181,7 @@ reg_enc_error(VALUE re, VALUE str)
 | 
			
		|||
{
 | 
			
		||||
    rb_raise(rb_eEncCompatError,
 | 
			
		||||
	     "incompatible encoding regexp match (%s regexp with %s string)",
 | 
			
		||||
	     rb_enc_name(RREGEXP(re)->ptr->enc),
 | 
			
		||||
	     rb_enc_name(rb_enc_get(re)),
 | 
			
		||||
	     rb_enc_name(rb_enc_get(str)));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue