summaryrefslogtreecommitdiff
path: root/jni/ruby/sample/tempfile.rb
blob: 5a363614a375d09eb71220161535852155e72eb8 (plain)
1
2
3
4
5
6
7
8
require 'tempfile'

f = Tempfile.new("foo")
f.print("foo\n")
f.close
f.open
p f.gets # => "foo\n"
f.close!