Commit df529a83 authored by Akira Yumiyama's avatar Akira Yumiyama

add $stdin $stdout $stderr STDIN STDOUT STDERR

parent 7a94d02e
......@@ -278,3 +278,33 @@ class IO
alias_method :to_i, :fileno
end
STDIN = IO.open(0, "r")
STDOUT = IO.open(1, "w")
STDERR = IO.open(1, "w")
$stdin = STDIN
$stdout = STDOUT
$stderr = STDERR
module Kernel
def print(*args)
STDOUT.print(*args)
end
def puts(*args)
STDOUT.puts(*args)
end
def printf(*args)
STDOUT.printf(*args)
end
def gets(*args)
STDIN.gets(*args)
end
def getc(*args)
STDIN.getc(*args)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment