summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/object.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c
index eb2c23e63..d7f3f5a55 100644
--- a/src/object.c
+++ b/src/object.c
@@ -553,6 +553,7 @@ mrb_convert_to_integer(mrb_state *mrb, mrb_value val, int base)
if (base != 0) {
tmp = mrb_check_string_type(mrb, val);
if (!mrb_nil_p(tmp)) {
+ val = tmp;
goto string_conv;
}
arg_error: