mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
9 lines
107 B
Ruby
9 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!
|