1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/-test-/num2int/num2int.c: should return valid values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-11-14 08:17:49 +00:00
parent ed681d3a82
commit 958caf186f

View file

@ -11,6 +11,7 @@ print_num2short(VALUE obj, VALUE num)
sprintf(buf, "%d", NUM2SHORT(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -22,6 +23,7 @@ print_num2ushort(VALUE obj, VALUE num)
sprintf(buf, "%u", NUM2USHORT(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -33,6 +35,7 @@ print_num2int(VALUE obj, VALUE num)
sprintf(buf, "%d", NUM2INT(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -44,6 +47,7 @@ print_num2uint(VALUE obj, VALUE num)
sprintf(buf, "%u", NUM2UINT(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -55,6 +59,7 @@ print_num2long(VALUE obj, VALUE num)
sprintf(buf, "%ld", NUM2LONG(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -66,6 +71,7 @@ print_num2ulong(VALUE obj, VALUE num)
sprintf(buf, "%lu", NUM2ULONG(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -77,6 +83,7 @@ print_num2ll(VALUE obj, VALUE num)
sprintf(buf, "%lld", NUM2LL(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}
static VALUE
@ -88,6 +95,7 @@ print_num2ull(VALUE obj, VALUE num)
sprintf(buf, "%llu", NUM2ULL(num));
str = rb_str_new_cstr(buf);
rb_io_write(rb_stdout, str);
return Qnil;
}