summaryrefslogtreecommitdiff
path: root/test/ruby/test_rational.rb
AgeCommit message (Collapse)Author
2014-08-24* test/ruby/test_rational.rb: fixed indent.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-24* test/ruby/test_rational.rb: remove commented-out code.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05* rational.c (nurat_expt): Deal with special cases for rationals 0, ±1marcandre
[bug #5713] [bug #5715] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-26test_complex.rb, test_rational.rb: revert some assertionsnobu
* test_complex.rb, test_rational.rb: revert some assertions, but just assert that a frozen object cannot be modified with marshal_load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25complex.c, rational.c: compatible marshal loadernobu
* complex.c, rational.c: compatible marshal loader for compatibilities with 1.8. [ruby-core:45775] [Bug #6625] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-22revert some teststadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 * complex.c: wrote Complex#_dump and Complex::load. But nowtadf
disabled (due to compatibility) [experimental]. * rational.c: wrote Rational#_dump and Rational::load. ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-03 * complex.c (nucomp_marshal_load): [ruby-core:45394]tadf
* rational.c (nurat_marshal_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-17* rational.c (nurat_coerce): Rational#coerce should converts itselfmrkn
into Complex if the argument is a Complex with non-zero imaginary part. [Bug #5020] [ruby-dev:44088] * test/ruby/test_rational.rb (test_coerce): test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-09 * test/ruby/test_{complex,rational}.rb: added tests.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-22added some tests.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06* rational.c (nurat_div): divided by infinity should be zero.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06* rational.c (nurat_div): divided by float zero should benobu
infinity. [ruby-core:31626] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05* complex.c (nucomp_marshal_load): should check the argument.nobu
[ruby-core:31622] * rational.c (nurat_marshal_load): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26 * complex.c, rational.c, lib/cmath.rb, lib/date.rb lib/date/delta*:tadf
reverted r27484-27486. now official spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-25 * complex.c, ratioanl.c: reverted experimental r24565.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-26* test/ruby/test_complex.rb (@unify): fix the detection if mathyugui
loaded. This makes test_complex.rb work fine with the previous commit. * test/ruby/test_rational.rb (@unify): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16 * complex.c (nucomp_rationalize) added. [experimental]tadf
* rational.c ({nurat,nilclass,integer,float}_rationalize) ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-25* complex.c (nucomp_hash), rational.c (nurat_hash): not to usenobu
hash value of class so that equality against subclasses can work. [ruby-dev:38850] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 * rational.c: renamed equal_p to eqeq_p.tadf
* complex.c: ditto. * complex.c (nucomp_equal_p): added. Complex(NaN).equal?(Complex(NaN)) should return true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27 * rational.c (nurat_cmp): use rb_num_coerce_cmp.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-18 * rational.c (nurat_s_convert): calls to_r when the given argumenttadf
is non-integer. * rational.c (nurat_s_convert): raises TypeError when the given argument is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16 * complex.c (nucomp_coerce): accepts Complex instances.tadf
* rational.c (nurat_coerce): accepts Rational instances. [ruby-core:23859] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-07removed extra spaces.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 * test/ruby/test_complex.rb: added some tests.tadf
* test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03revert.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02* test/ruby/test_rational.rb: add a test.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-10trivial changes.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 * complex.c (nucomp_s_canonicalize_internal): does no applytadf
canonicalization rule anymore. * rational.c (nurat_s_canonicalize_internal(_no_reduce)?): ditto. * complex.c: removed class method new! and new. * rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-21 * complex.c (nucomp_s_canonicalize_internal): checks exactness oftadf
imag only. * rational.c (nurat_s_convert): accepts non real value (Rational(a,b) as a/b). * complex.c (nucomp_s_convert): refined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-19* prec.c: removed. Precision will be redesigned and be back again.yugui
c.f. [ruby-dev:36352]. * common.mk (COMMON_OBJS): removed prec.o. * inits.c (rb_call_inits): removed Init_Precision. * numeric.c (Init_Numeric): removed inclusion of Precision. removed #induced_from from each class. * rational.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * lib/rdoc/knwon_classes.rb: removed the entry for Precision. * test/ruby/test_prec.rb: removed. * test/ruby/test_integer.rb: removed tests for Precision. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_float.rb: ditto. * test/ruby/test_rational.rb: ditto. * test/ruby/test_complex.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 * numeric.c: provides predicate real? instead of scalar?.tadf
* complex.c: follows the above change. * lib/cmath.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 * complex.c (nucomp_marshal_{dump,load}): preserve instancetadf
variables. * rational.c (nurat_marshal_{dump,load}): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 * complex.c: refined.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 * rational.c: removed unused code.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 * complex.c: uses f_real_p macro.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 * complex.c (numeric_abs2): new.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29removed some lines which gain the score of coverage.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29 * complex.c ({nucomp,numeric}_rect): new.tadf
* complex.c: added some aliases (::rectangular, ::rect, #rectangular, #rect, #phase, #magnitude). * complex.c (string_to_c_internal): should not strip any null bytes. * rational.c (string_to_r_internal): ditto. * rational.c (i_gcd): reverted to nurat 0.0.2's one. * numeric.c: added an alias (#magnitude). * test/ruby/test_complex.rb: added assertions. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22 * complex.c (nucomp_div): now behaves as quo.tadf
* complex.c (nucomp_s_generic_p): has been removed. * complex.c (nucomp_to_s): adopts new form. * complex.c (nucomp_inspect): ditto. * complex.c (string_to_c_internal): ditto and supports polar form. * complex.c (rb_complex_polar): new. * rational.c (nurat_to_s): did not canonicalize. * rational.c (nurat_inspect): adopts new form. * rational.c (string_to_r_internal): ditto. * include/ruby/intern.h: added a declaration. * lib/complex.rb: added an obsolate class method. * lib/cmath.rb: use scalar? instead of generic?. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-13* test/ruby/test_io_m17n.rb: remove a duplicative method.mame
* test/ruby/test_utf16.rb: rename a conflicting method name. * test/ruby/test_array.rb: ditto. * test/ruby/test_file_exhaustive.rb: ditto. * test/ruby/test_hash.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-03* bignum.c (Init_Bignum): rdiv method removed. [ruby-dev:34242]matz
* complex.c (nucomp_quo): ditto. * numeric.c (num_rdiv): ditto. * rational.c (nurat_div): ditto. * complex.c (nucomp_fdiv): fdiv implementation restored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-02* numeric.c (num_rdiv): should always return rational number.matz
* rational.c (nurat_add, nurat_sub, nurat_mul, nurat_fdiv, nurat_cmp): use rb_num_coerce_bin(). * rational.c (nurat_division): does / and rdiv. * .gdbinit (rp): no longer use rb_p(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-26anyway renamed.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-25* test/ruby/test_rational.rb: add tests to achieve over 90% testmame
coverage of rational.c. * test/ruby/test_complex.rb: ditto for complex.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-22fixed. [ruby-dev:34109]tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-16both complex and rational are now builtin classes.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e