mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* sample/exyacc.rb: use Regexp in gsub!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									267b39cfb4
								
							
						
					
					
						commit
						add23cc22e
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -11,8 +11,8 @@ while gets()
 | 
			
		|||
  sub!(/.*\n/, "")
 | 
			
		||||
  gsub!(/'\{'/, "'\001'")
 | 
			
		||||
  gsub!(/'}'/, "'\002'")
 | 
			
		||||
  gsub!('\*/', "\003\003")
 | 
			
		||||
  gsub!("/\\*[^\003]*\003\003", '')
 | 
			
		||||
  gsub!(%r{\*/}, "\003\003")
 | 
			
		||||
  gsub!(%r{/\*[^\003]*\003\003}, '')
 | 
			
		||||
  while gsub!(/\{[^{}]*}/, ''); end
 | 
			
		||||
  gsub!(/'\001'/, "'{'")
 | 
			
		||||
  gsub!(/'\002'/, "'}'")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue