mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Move methods of Kernel to kernel.rb from io.rb in mruby-io gem
This commit is contained in:
@@ -372,25 +372,3 @@ STDERR = IO.open(2, "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
|
||||
|
||||
@@ -12,4 +12,24 @@ module Kernel
|
||||
File.open(file, *rest, &block)
|
||||
end
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user