summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-io')
-rw-r--r--mrbgems/mruby-io/mrblib/file.rb2
-rw-r--r--mrbgems/mruby-io/mrblib/io.rb4
-rw-r--r--mrbgems/mruby-io/test/io.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/mrbgems/mruby-io/mrblib/file.rb b/mrbgems/mruby-io/mrblib/file.rb
index aa73252e1..9398acef6 100644
--- a/mrbgems/mruby-io/mrblib/file.rb
+++ b/mrbgems/mruby-io/mrblib/file.rb
@@ -2,7 +2,7 @@ class File < IO
attr_accessor :path
def initialize(fd_or_path, mode = "r", perm = 0666)
- if fd_or_path.kind_of? Fixnum
+ if fd_or_path.kind_of? Integer
super(fd_or_path, mode)
else
@path = fd_or_path
diff --git a/mrbgems/mruby-io/mrblib/io.rb b/mrbgems/mruby-io/mrblib/io.rb
index e597db886..034f88529 100644
--- a/mrbgems/mruby-io/mrblib/io.rb
+++ b/mrbgems/mruby-io/mrblib/io.rb
@@ -186,7 +186,7 @@ class IO
def read(length = nil, outbuf = "")
unless length.nil?
- unless length.is_a? Fixnum
+ unless length.is_a? Integer
raise TypeError.new "can't convert #{length.class} into Integer"
end
if length < 0
@@ -229,7 +229,7 @@ class IO
case arg
when String
rs = arg
- when Fixnum
+ when Integer
rs = "\n"
limit = arg
else
diff --git a/mrbgems/mruby-io/test/io.rb b/mrbgems/mruby-io/test/io.rb
index 2088a61e3..47c70cc60 100644
--- a/mrbgems/mruby-io/test/io.rb
+++ b/mrbgems/mruby-io/test/io.rb
@@ -7,7 +7,7 @@ $cr, $crlf, $cmd = MRubyIOTestUtil.win? ? [1, "\r\n", "cmd /c "] : [0, "\n", ""]
def assert_io_open(meth)
assert "assert_io_open" do
fd = IO.sysopen($mrbtest_io_rfname)
- assert_equal Fixnum, fd.class
+ assert_equal Integer, fd.class
io1 = IO.__send__(meth, fd)
begin
assert_equal IO, io1.class
@@ -433,7 +433,7 @@ assert('IO.popen') do
$? = nil
io = IO.popen("#{$cmd}echo mruby-io")
assert_true io.close_on_exec?
- assert_equal Fixnum, io.pid.class
+ assert_equal Integer, io.pid.class
out = io.read
assert_equal out.class, String