mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	The use of $_ and ~/RE/ is discouraged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									d46e835344
								
							
						
					
					
						commit
						913bc18761
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -2,8 +2,10 @@
 | 
			
		|||
# list all files but .*/*~/*.o
 | 
			
		||||
dirp = Dir.open(".")
 | 
			
		||||
for f in dirp
 | 
			
		||||
  $_ = f
 | 
			
		||||
  unless (~/^\./ || ~/~$/ || ~/\.o/)
 | 
			
		||||
  case f
 | 
			
		||||
  when /^\./, /~$/, /\.o/
 | 
			
		||||
    # do not print
 | 
			
		||||
  else
 | 
			
		||||
    print f, "\n"
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue