Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.652 kb
assert ":ok", "File.open('#{__FILE__}', 'r') { p :ok }"
assert "true", "p(Dir['../*.c'].length > 1)"
assert "true", "p(Dir.glob('../*.c').length > 1)"
assert '', "#!ruby\n;" # fails because of a bug in ungetc that makes ruby read "!\n;"
assert '"abcdef"', %{
f = File.open('#{__FILE__}')
f.ungetc("\n")
f.ungetc("f")
f.ungetc("de")
f.ungetc("c")
f.ungetc("ab")
p f.gets.strip
}
assert Process.uid.to_s, "p Process.uid"
assert Process.euid.to_s, "p Process.euid"
assert ":ok", "p File.expand_path('../fixtures/foo', '#{__FILE__}').include?('..') ? :fail : :ok"
assert ":ok", "require File.expand_path('../fixtures/foo', '#{__FILE__}')"
Jump to Line
Something went wrong with that request. Please try again.