From 80fe9838d2fdab1bb819bbeea892ebe748837b99 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 19 Jan 2020 09:48:14 +0900 Subject: 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. --- mrbgems/mruby-io/mrblib/file.rb | 2 +- mrbgems/mruby-io/mrblib/io.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mrbgems/mruby-io/mrblib') 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 -- cgit v1.2.3