mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Return new NODE_LIT
As NODE_ZLIST/NODE_LIST are not markable, cannot be reused as NODE_LIT.
This commit is contained in:
		
							parent
							
								
									bb40c5cbe9
								
							
						
					
					
						commit
						6bcc4664bd
					
				
				
				Notes:
				
					git
				
				2021-01-14 16:59:47 +09:00 
				
			
			
			
		
		
					 1 changed files with 2 additions and 5 deletions
				
			
		
							
								
								
									
										7
									
								
								parse.y
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								parse.y
									
										
									
									
									
								
							|  | @ -11148,9 +11148,7 @@ shareable_literal_constant(struct parser_params *p, enum shareability shareable, | ||||||
|       case NODE_ZLIST: |       case NODE_ZLIST: | ||||||
| 	lit = rb_ary_new(); | 	lit = rb_ary_new(); | ||||||
| 	OBJ_FREEZE_RAW(lit); | 	OBJ_FREEZE_RAW(lit); | ||||||
| 	nd_set_type(value, NODE_LIT); | 	return NEW_LIT(lit, loc); | ||||||
| 	RB_OBJ_WRITE(p->ast, &value->nd_lit, lit); |  | ||||||
| 	return value; |  | ||||||
| 
 | 
 | ||||||
|       case NODE_LIST: |       case NODE_LIST: | ||||||
| 	lit = rb_ary_new(); | 	lit = rb_ary_new(); | ||||||
|  | @ -11235,8 +11233,7 @@ shareable_literal_constant(struct parser_params *p, enum shareability shareable, | ||||||
| 	value = make_shareable_node(p, value, false, loc); | 	value = make_shareable_node(p, value, false, loc); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
| 	nd_set_type(value, NODE_LIT); | 	value = NEW_LIT(rb_ractor_make_shareable(lit), loc); | ||||||
| 	RB_OBJ_WRITE(p->ast, &value->nd_lit, rb_ractor_make_shareable(lit)); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     return value; |     return value; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nobuyoshi Nakada
						Nobuyoshi Nakada