From 23e7cb41e5b4b023edfa2a018545b8f09069533c Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 3 Aug 2021 12:56:34 +0900 Subject: Replace `fixnum` references with `int`. The `Fixnum` class is no longer provided by `mruby`. --- src/string.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index 2258cc218..a7d7a0f44 100644 --- a/src/string.c +++ b/src/string.c @@ -1171,14 +1171,14 @@ mrb_str_aref(mrb_state *mrb, mrb_value str, mrb_value indx, mrb_value alen) /* 15.2.10.5.34 */ /* * call-seq: - * str[fixnum] => fixnum or nil - * str[fixnum, fixnum] => new_str or nil - * str[range] => new_str or nil - * str[other_str] => new_str or nil - * str.slice(fixnum) => fixnum or nil - * str.slice(fixnum, fixnum) => new_str or nil - * str.slice(range) => new_str or nil - * str.slice(other_str) => new_str or nil + * str[int] => int or nil + * str[int, int] => new_str or nil + * str[range] => new_str or nil + * str[other_str] => new_str or nil + * str.slice(int) => int or nil + * str.slice(int, int) => new_str or nil + * str.slice(range) => new_str or nil + * str.slice(other_str) => new_str or nil * * Element Reference---If passed a single Integer, returns the code * of the character at that position. If passed two Integer @@ -1378,8 +1378,8 @@ mrb_str_aset(mrb_state *mrb, mrb_value str, mrb_value indx, mrb_value alen, mrb_ /* * call-seq: - * str[fixnum] = replace - * str[fixnum, fixnum] = replace + * str[int] = replace + * str[int, int] = replace * str[range] = replace * str[other_str] = replace * @@ -1750,7 +1750,7 @@ mrb_str_hash(mrb_state *mrb, mrb_value str) /* 15.2.10.5.20 */ /* * call-seq: - * str.hash => fixnum + * str.hash => int * * Return a hash based on the string's length and content. */ @@ -1758,14 +1758,14 @@ static mrb_value mrb_str_hash_m(mrb_state *mrb, mrb_value self) { mrb_int key = mrb_str_hash(mrb, self); - return mrb_fixnum_value(key); + return mrb_int_value(mrb, key); } /* 15.2.10.5.21 */ /* * call-seq: * str.include? other_str => true or false - * str.include? fixnum => true or false + * str.include? int => true or false * * Returns true if str contains the given string or * character. @@ -1788,7 +1788,7 @@ mrb_str_include(mrb_state *mrb, mrb_value self) /* 15.2.10.5.22 */ /* * call-seq: - * str.index(substring [, offset]) => fixnum or nil + * str.index(substring [, offset]) => int or nil * * Returns the index of the first occurrence of the given * substring. Returns nil if not found. @@ -2014,7 +2014,7 @@ mrb_str_reverse(mrb_state *mrb, mrb_value str) /* 15.2.10.5.31 */ /* * call-seq: - * str.rindex(substring [, offset]) => fixnum or nil + * str.rindex(substring [, offset]) => int or nil * * Returns the index of the last occurrence of the given substring. * Returns nil if not found. If the second parameter is @@ -2718,7 +2718,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str) /* * call-seq: - * str.bytes -> array of fixnums + * str.bytes -> array of int * * Returns an array of bytes in _str_. * -- cgit v1.2.3