mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	 a7f672a17e
			
		
	
	
		a7f672a17e
		
	
	
	
	
		
			
			* sample/tempfile.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
			
				
	
	
		
			8 lines
		
	
	
	
		
			107 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
	
		
			107 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require 'tempfile'
 | |
| 
 | |
| f = Tempfile.new("foo")
 | |
| f.print("foo\n")
 | |
| f.close
 | |
| f.open
 | |
| p f.gets # => "foo\n"
 | |
| f.close!
 |