summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 7dc8b138a4..e368b59c3d 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3022,7 +3022,12 @@ int_to_s(int argc, VALUE *argv, VALUE x)
rb_scan_args(argc, argv, "01", &b);
base = NUM2INT(b);
}
+ return rb_int2str(x, base);
+}
+VALUE
+rb_int2str(VALUE x, int base)
+{
if (FIXNUM_P(x)) {
return rb_fix2str(x, base);
}