mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	symbol.c: dsymbol initial encoding
* symbol.c (dsymbol_alloc): set encoding directly. no need to check existing encoding in rb_enc_associate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									c6d5b61745
								
							
						
					
					
						commit
						40efaab301
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								symbol.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								symbol.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -509,7 +509,7 @@ dsymbol_alloc(const VALUE klass, const VALUE str, rb_encoding * const enc, const
 | 
			
		|||
    const VALUE dsym = rb_newobj_of(klass, T_SYMBOL | FL_WB_PROTECTED);
 | 
			
		||||
    long hashval;
 | 
			
		||||
 | 
			
		||||
    rb_enc_associate(dsym, enc);
 | 
			
		||||
    rb_enc_set_index(dsym, rb_enc_to_index(enc));
 | 
			
		||||
    OBJ_FREEZE(dsym);
 | 
			
		||||
    RB_OBJ_WRITE(dsym, &RSYMBOL(dsym)->fstr, str);
 | 
			
		||||
    RSYMBOL(dsym)->id = type;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue