summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/mrblib
diff options
context:
space:
mode:
authordearblue <[email protected]>2020-01-19 09:48:14 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:44 +0900
commit80fe9838d2fdab1bb819bbeea892ebe748837b99 (patch)
tree848da66323175327b5950dc41868e85a3bd3611f /mrbgems/mruby-io/mrblib
parent40d0d8fe0efa6a34b54ef90a93f16b17fe3f3c7b (diff)
downloadmruby-80fe9838d2fdab1bb819bbeea892ebe748837b99.tar.gz
mruby-80fe9838d2fdab1bb819bbeea892ebe748837b99.zip
Integrate `Fixnum` class into `Integer` class
* The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead.
Diffstat (limited to 'mrbgems/mruby-io/mrblib')
-rw-r--r--mrbgems/mruby-io/mrblib/file.rb2
-rw-r--r--mrbgems/mruby-io/mrblib/io.rb4
2 files changed, 3 insertions, 3 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