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

13 commits

Author SHA1 Message Date
nobu
84255e0485 * vm_method.c (rb_remove_method_id): exported.
* numeric.c (num_sadded): fix for non-ascii method name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-27 09:31:11 +00:00
tadf
d82ed7e2c6 * numeric.c (num_div): don't use num_floor which is actually
flo_floor.

	* numeric.c (num_modulo): don't call '%'.

	* numeric.c (num_divmod): use num_modulo.

	* numeric.c: defined '%'.

	* rational.c (nurat_idiv,nurat_mod,nurat_divmod,nurat_rem): removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 12:37:13 +00:00
tadf
acde7364f7 * numeric.c: provides predicate real? instead of scalar?.
* 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 22:04:19 +00:00
matz
77446d45a8 * numeric.c (num_div): should raise ZeroDivisionError.
* numeric.c (fix_divide): ditto.

* test/ruby/test_numeric.rb (TestNumeric::test_divmod): avoid
  ZeroDivisionError in tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-27 12:51:28 +00:00
matz
10f263c10e * numeric.c (bit_coerce): float should not be a valid operand of
bitwise operations.  [ruby-dev:34583]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 13:24:55 +00:00
matz
fa16110326 * bignum.c (rb_big_fdiv): flo.fdiv(NaN) should result NaN.
* numeric.c (num_quo): renamed and moved from bignum.c.
  [ruby-dev:34582]

* bignum.c (rb_big_fdiv): update RDoc description

* rational.c (nurat_s_new_m): small refactoring.

* bignum.c (rb_big2dbl): no need for forceful warning when
  converting to float.  overflow is a nature of float values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 04:14:57 +00:00
tadf
4e046758f5 * numeric.c: cancelled recent changes (except to remove rdiv).
* bignum.c: ditto.

	* bignum.c: added rb_big_idiv.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 13:52:26 +00:00
matz
c3d2e4d381 * numeric.c (num_rdiv): should always return rational number.
* 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-04-02 14:13:53 +00:00
matz
020d4e4d38 * test/ruby/test_numeric.rb (TestNumeric::test_num2long): bit-and
should not raise RangeError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-13 16:38:56 +00:00
akr
b7d7519b18 add a test for [ruby-dev:34006].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 06:10:22 +00:00
akr
6f8d578b8a code duplication removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-08 05:56:03 +00:00
mame
65753a5838 * test/ruby/test_pack.rb: fix tests for 64bit CPU.
* test/ruby/test_bignum.rb: ditto.

* test/ruby/test_file_exhaustive.rb: ditto.

* test/ruby/test_integer.rb: ditto.

* test/ruby/test_time.rb: ditto.

* test/ruby/test_numeric.rb: ditto.

* test/ruby/test_fixnum.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-10 21:52:25 +00:00
mame
8f655cec3d * test/ruby/test_file_exhaustive.rb: add tests to achive over 80% test coverage of file.c.
* test/ruby/test_numeric.rb: forgot to add this (at r15360).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-03 12:14:30 +00:00