summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-10-18 10:50:23 +0900
committerKOBAYASHI Shuji <[email protected]>2019-10-18 10:50:23 +0900
commite5d767b1492e5800ac3ca2b49394e717247f18c5 (patch)
tree724cfd71a7c956b0648e8c58f3717d797fff5f29 /mrbgems/mruby-io
parente5f7b1d26270909df34aa153b5a68989174aa4f9 (diff)
downloadmruby-e5d767b1492e5800ac3ca2b49394e717247f18c5.tar.gz
mruby-e5d767b1492e5800ac3ca2b49394e717247f18c5.zip
Move methods of `Kernel` to `kernel.rb` from `io.rb` in `mruby-io` gem
Diffstat (limited to 'mrbgems/mruby-io')
-rw-r--r--mrbgems/mruby-io/mrblib/io.rb22
-rw-r--r--mrbgems/mruby-io/mrblib/kernel.rb20
2 files changed, 20 insertions, 22 deletions
diff --git a/mrbgems/mruby-io/mrblib/io.rb b/mrbgems/mruby-io/mrblib/io.rb
index 5c06dc5d8..5df1932df 100644
--- a/mrbgems/mruby-io/mrblib/io.rb
+++ b/mrbgems/mruby-io/mrblib/io.rb
@@ -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
diff --git a/mrbgems/mruby-io/mrblib/kernel.rb b/mrbgems/mruby-io/mrblib/kernel.rb
index 373b76f98..42d5bb1d1 100644
--- a/mrbgems/mruby-io/mrblib/kernel.rb
+++ b/mrbgems/mruby-io/mrblib/kernel.rb
@@ -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