akr
0cbe2f4902
* ext/-test-/num2int/num2int.c: Return string for result, instead of
...
printing.
* test/-ext-/num2int/test_num2int.rb: updated to follow above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 11:58:55 +00:00
akr
a7526797a6
* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.
...
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.
* test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 16:14:15 +00:00
nobu
f4aff7feb1
num2ll and num2ull
...
* ext/-test-/num2int/num2int.c (print_num2ll, print_num2ull): define
only if long long is available, and use long long printf modifier
checked by configure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 15:21:04 +00:00
usa
ce03ef0242
* ext/-test-/num2int/num2int.c: remove an unnecessary and wrong decl
...
of rb_stdout. it's declared in ruby.h correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 01:46:43 +00:00
nobu
958caf186f
* 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
2011-11-14 08:17:49 +00:00
kosaki
b2a2ba1191
* include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
...
* numeric.c: ditto.
* test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
* ext/-test-/num2int/num2int.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:54:34 +00:00
kosaki
74a13c7634
* numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
...
* bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.
* test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
* ext/-test-/num2int/depend: ditto.
* ext/-test-/num2int/extconf.rb: ditto.
* ext/-test-/num2int/num2int.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:45:47 +00:00