summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-10-18 12:23:28 +0900
committerGitHub <[email protected]>2019-10-18 12:23:28 +0900
commit20d01f118ddb7e7f2f36926a7a3db35573611857 (patch)
tree724cfd71a7c956b0648e8c58f3717d797fff5f29
parente5f7b1d26270909df34aa153b5a68989174aa4f9 (diff)
parente5d767b1492e5800ac3ca2b49394e717247f18c5 (diff)
downloadmruby-20d01f118ddb7e7f2f36926a7a3db35573611857.tar.gz
mruby-20d01f118ddb7e7f2f36926a7a3db35573611857.zip
Merge pull request #4778 from shuujii/move-methods-of-Kernel-to-kernel.rb-from-io.rb-in-mruby-io-gem
Move methods of `Kernel` to `kernel.rb` from `io.rb` in `mruby-io` gem
-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