Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 652 Bytes
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__}')"
Something went wrong with that request. Please try again.