summaryrefslogtreecommitdiff
path: root/test/-ext-/integer
AgeCommit message (Collapse)Author
2019-03-11numeric.c: fix infinite loopnobu
* numeric.c (int_pow): fix infinite loop in the case of y equal 1 and power of x does not overflow. [ruby-core:91734] [Bug #15651] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13Rename test classes to allow stable test count when running test-all -jnobu
[Fix GH-1763] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-06Rename RbConfig::Limits as RbConfig::LIMITSnobu
* template/limits.c.tmpl (Init_limits): rename RbConfig::Limits as RbConfig::LIMITS, constants other than class or module are all uppercase with underscores by convention. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02test: use RbConfig::Limitsnobu
* test/lib/envutil.rb: rbconfig/sizeof may not be available when cross-compiling. use RbConfig::Limits instead of calculating limits of Fixnum with hard-coded CHAR_BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-22-test-/integernobu
* ext/-test-/integer/core_ext.c: move testutil/integer.c. * test/lib/-test-/integer.rb: extract implementation details from test/unit/assertions.rb. [Bug #12408] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-22move duplicate assertionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-19* numeric.c (int_to_f): raise NotImplementedError when a receivermrkn
class is unknown. * test/-ext-/integer/test_my_integer.rb (test_my_integer_to_f): modify a test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-19* bignum.c (Bignum#<=>): remove it because they are unified withmrkn
Integer#<=>. * numeric.c (Integer#<=>, Fixnum#<=>): move <=> method from Fixnum to Integer. * numeric.c (int_cmp): add this method for Integer#<=>. * test/-ext-/integer/test_my_integer.rb (test_my_integer_cmp): add a test to examine Integer#<=> for unknown subclasses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-18* numeric.c (int_to_f, fix_to_f): rename fix_to_f to int_to_f, and addmrkn
treatment for subclasses which don't have definitions of to_f method. * numeric.c (Integer#to_f, Fixnum#to_f): move to_f method from Fixnum to Integer. * ext/-test-/integer/my_integer.rb: define helper class for testing to_f method for a subclass of Integer. * ext/-test-/integer/extconf.rb: ditto. * ext/-test-/integer/init.c: ditto. * test/-ext-/integer/test_my_integer.rb: examine to_f method for a subclass of Integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e