mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	ruby.c: remove unnecessary context
* ruby.c (process_options): remove unnecessary context. rb_parser_append_print and rb_parser_while_loop just append some nodes and do not depend on the context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									f42d2ca85a
								
							
						
					
					
						commit
						b0d81c1073
					
				
					 1 changed files with 2 additions and 6 deletions
				
			
		
							
								
								
									
										8
									
								
								ruby.c
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								ruby.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1629,14 +1629,10 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    if (opt->do_print) {
 | 
			
		||||
	PREPARE_PARSE_MAIN({
 | 
			
		||||
	    tree = rb_parser_append_print(parser, tree);
 | 
			
		||||
	});
 | 
			
		||||
	tree = rb_parser_append_print(parser, tree);
 | 
			
		||||
    }
 | 
			
		||||
    if (opt->do_loop) {
 | 
			
		||||
	PREPARE_PARSE_MAIN({
 | 
			
		||||
	    tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split);
 | 
			
		||||
	});
 | 
			
		||||
	tree = rb_parser_while_loop(parser, tree, opt->do_line, opt->do_split);
 | 
			
		||||
	rb_define_global_function("sub", rb_f_sub, -1);
 | 
			
		||||
	rb_define_global_function("gsub", rb_f_gsub, -1);
 | 
			
		||||
	rb_define_global_function("chop", rb_f_chop, 0);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue