akr
74b314e41f
* test/ruby/test_refinement.rb (test_inspect): Use Integer instead of Fixnum.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-02 03:35:52 +00:00
nobu
0e3475a6d9
string.c: fix braces
...
* string.c (search_nonascii): fix braces unmatched by a
preprocessing condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-02 00:06:04 +00:00
akr
f1183cb910
complex.c don't refer rb_cFixnum and rb_cBignum.
...
* complex.c: Don't refer rb_cFixnum and rb_cBignum.
(k_fixnum_p): Use FIXNUM_P.
(k_bignum_p): Use RB_TYPE_P.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 21:59:41 +00:00
naruse
2fc973796a
fix mixed declaration on non UNALIGNED_WORD_ACCESS
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 18:27:41 +00:00
akr
af97057c4d
* test/ruby/test_numeric.rb (test_step): Use Integer::FIXNUM_MAX.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 16:28:18 +00:00
akr
76be3f22c7
test_name use Integer instead of Fixnum.
...
* test/ruby/test_module.rb (test_name): Use Integer instead of Fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 16:15:29 +00:00
akr
5ea4824508
test/lib/test/unit/assertions.rb defines assert_fixnum and assert_bignum.
...
* test/lib/test/unit/assertions.rb (assert_fixnum): Defined.
(assert_bignum): Defined.
* test/ruby/test_bignum.rb: Use assert_bignum.
* test/ruby/test_integer_comb.rb: Use assert_fixnum and assert_bignum.
* test/ruby/test_optimization.rb: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 16:01:36 +00:00
akr
0963d96e52
Add a cast to avoid signed integer overflow.
...
* vm_trace.c (recalc_remove_ruby_vm_event_flags): Add a cast to
avoid signed integer overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 15:42:52 +00:00
akr
de2f7416d2
envutil.rb defines Integer::{FIXNUM_MIN,FIXNUM_MAX}.
...
* test/lib/envutil.rb: Define Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* test/ruby/test_bignum.rb: Use Integer::{FIXNUM_MIN,FIXNUM_MAX}.
* test/ruby/test_bignum.rb: Ditto.
* test/ruby/test_integer_comb.rb: Ditto.
* test/ruby/test_marshal.rb: Ditto.
* test/ruby/test_optimization.rb: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 15:16:17 +00:00
svn
f98c9a0aa6
* 2016-05-02
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 15:02:48 +00:00
mrkn
78729a59a2
Fix rb_ary_sum for mathn
...
* array.c (rb_ary_sum): fix for mathn
* test/ruby/test_array.rb (test_sum): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 15:02:47 +00:00
usa
b1376614de
* test/logger/test_logdevice.rb (TestLogDevice#test_shifting_period_suffix):
...
too many shifting. the last shifting created logs named as `*.3`, and
they were never unlinked.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 14:56:45 +00:00
usa
b1ec36b2e6
* test/lib/test/unit.rb (Options#non_options): fixed wrong regexp.
...
if both positives and negatives were specified, postives had to
be spcicifed from the beginning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 14:54:44 +00:00
naruse
64837f778a
fix for where UNALIGNED_WORD_ACCESS is not allowed
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 14:19:02 +00:00
akr
0565551930
update comments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 12:50:19 +00:00
akr
9ac296698a
Fix a test message.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 12:30:51 +00:00
usa
54916154a0
* win32/win32.c: drop Win2K support.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 12:00:35 +00:00
usa
62b6e90d58
* cont.c, hash.c, random.c, win32/win32.c: cleanup some Win9x/ME/NT4
...
support leftovers.
[fix GH-1328] patched by @cremno
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 11:42:41 +00:00
naruse
db2c32778d
Use WORDS_BIGENDIAN
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 09:07:14 +00:00
akr
396d835d09
[DOC] merge documents for {Integer,Fixnum}#succ.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 01:35:43 +00:00
nobu
215a3894d0
ChangeLog: fix a typo [ci skip]
...
* ChangeLog: fix typo, process ID is unrelated to login shell
name, should be user ID.
http://twitter.com/nagachika/status/726553209821523968
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 00:56:15 +00:00
naruse
0f0121fe1a
* string.c (search_nonascii): use nlz on big endian environments.
...
* internal.h (nlz_intpr): defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 22:32:05 +00:00
akr
aa2395b887
fix a typo.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 22:05:43 +00:00
naruse
424a706afe
More optimization for r54854's search_nonascii
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 16:32:36 +00:00
svn
30c2d8ba85
* 2016-05-01
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 15:39:03 +00:00
naruse
b888ee25ff
revert UNALIGNED_WORD_ACCESS for GCC6
...
Released GCC 6.0 fixed the issue.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69291
[ruby-core:72211] [Bug #11831 ] [Bug #11979 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 15:39:03 +00:00
naruse
4cf460a7bb
* string.c (search_nonascii): unroll and use ntz
...
* configure.in (__builtin_ctz): check.
* configure.in (__builtin_ctzll): check.
* internal.h (rb_popcount32): defined for ntz_int32.
it can use __builtin_popcount but this function is not used on
GCC environment because it uses __builtin_ctz.
When another function uses this, using __builtin_popcount
should be re-considered.
* internal.h (rb_popcount64): ditto.
* internal.h (ntz_int32): defined for ntz_intptr.
* internal.h (ntz_int64): defined for ntz_intptr.
* internal.h (ntz_intptr): defined as ntz for uintptr_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 15:39:02 +00:00
akr
c19c8ef4ae
[DOC]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 13:05:22 +00:00
akr
6b6fa21031
Gather Fixnum method definitions.
...
* numeric.c (Init_Numeric): Gather Fixnum method definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 12:55:59 +00:00
akr
8248c26e6d
Define Integer#/ instead of Bignum#/.
...
* numeric.c (rb_int_div): Define Integer#/.
* bignum.c (rb_big_div): Don't define Bignum#/.
* lib/mathn.rb (Integer#/): Replace Integer#/ instead of Bignum#/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 12:39:53 +00:00
akr
d0e2d150b8
Define Integer#+ instead of Bignum#+.
...
* numeric.c (rb_int_plus): Define Integer#+.
* bignum.c (rb_big_plus): Don't define Bignum#+.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 12:24:06 +00:00
akr
11ca96d3a3
Define Integer#- instead of Bignum#-.
...
* numeric.c (rb_int_minus): Define Integer#-.
* bignum.c (rb_big_minus): Don't define Bignum#-.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 12:09:31 +00:00
akr
a9f3a1cda1
Define Integer#* instead of Bignum#*.
...
* numeric.c (rb_int_mul): Define Integer#*.
* bignum.c (rb_big_mul): Don't define Bignum#*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 11:54:26 +00:00
akr
e27a06f4bb
Define Integer#% instead of Bignum#%.
...
* numeric.c (rb_int_modulo): Define Integer#%.
* bignum.c (rb_big_modulo): Don't define Bignum#%.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 11:31:28 +00:00
akr
25f2c85066
Define Integer#== instead of Bignum#==.
...
* numeric.c (int_equal): Define Integer#==.
* bignum.c (rb_big_eq): Don't define Bignum#==.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 11:18:00 +00:00
akr
70279a5700
Define Integer#> instead of Bignum#>.
...
* numeric.c (int_gt): Define Integer#>.
* bignum.c (rb_big_gt): Don't define Bignum#>.
Renamed from big_gt.
* internal.h (rb_big_gt): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 10:42:06 +00:00
akr
289c3f40a1
Define Integer#>= instead of Bignum#>=.
...
* numeric.c (int_ge): Define Integer#>=.
* bignum.c (rb_big_ge): Don't define Bignum#>=.
Renamed from big_ge.
* internal.h (rb_big_ge): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 10:26:17 +00:00
hsbt
5576a93756
* doc/standard_library.rdoc: Remove obsoleted classes and modules.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 10:20:43 +00:00
akr
6b16db9c80
Define Integer#< instead of Bignum#<.
...
* numeric.c (int_lt): Define Integer#<.
* bignum.c (rb_big_lt): Don't define Bignum#<.
Renamed from big_lt.
* internal.h (rb_big_lt): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 10:10:23 +00:00
akr
d00bca92a9
Define Integer#<= instead of Bignum#<=.
...
* numeric.c (int_le): Define Integer#<=.
* bignum.c (rb_big_le): Don't define Bignum#<=.
Renamed from big_le.
* internal.h (rb_big_le): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 09:48:25 +00:00
akr
d13774e23f
Define Integer#GMP_VERSION.
...
* bignum.c (Init_Bignum): Define Integer#GMP_VERSION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 09:12:11 +00:00
akr
11678caa34
Define Integer#-@ instead of Fixnum#-@.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 08:52:49 +00:00
akr
635cff451f
Define Integer#remainder instead of Bignum#remainder.
...
* numeric.c (int_remainder): Define Integer#remainder.
* bignum.c (rb_big_remainder): Don't define Bignum#remainder.
* internal.h (rb_big_remainder): Declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 08:27:30 +00:00
akr
ae225a2ca8
{Fixnum,Bignum}#-@ is unified into Integer.
...
* numeric.c (rb_int_uminus): {Fixnum,Bignum}#-@ is unified into
Integer.
* bignum.c (rb_big_uminus): Don't define Bignum#-@.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 06:30:08 +00:00
akr
73dd745cf1
{Fixnum,Bignum}#div is unified into Integer.
...
* numeric.c (rb_int_idiv): {Fixnum,Bignum}#div is unified into
Integer.
* bignum.c (rb_big_idiv): Don't define Bignum#div.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 05:43:15 +00:00
akr
728333dcd3
{Fixnum,Bignum}#modulo is unified into Integer.
...
* numeric.c (rb_int_modulo): {Fixnum,Bignum}#modulo is unified into
Integer.
* bignum.c (rb_big_modulo): Don't define Bignum#modulo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 05:26:52 +00:00
akr
1b1a1ed6c8
{Fixnum,Bignum}#divmod is unified into Integer.
...
* numeric.c (int_divmod): {Fixnum,Bignum}#divmod is unified into
Integer.
* bignum.c (rb_big_divmod): Don't define Bignum#divmod.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 05:05:54 +00:00
akr
bda463c134
move Fixnum#/ document position.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 04:22:27 +00:00
akr
27f9556de9
{Fixnum,Bignum}#fdiv is unified into Integer.
...
* numeric.c (int_fdiv): {Fixnum,Bignum}#fdiv is unified into
Integer.
* bignum.c (rb_big_fdiv): Don't define Bignum#fdiv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 04:20:56 +00:00
akr
8a2df1ce3f
{Fixnum,Bignum}#** is unified into Integer.
...
* numeric.c (rb_int_pow): {Fixnum,Bignum}#** is unified into
Integer.
* bignum.c (rb_big_pow): Don't define Bignum#**.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30 03:59:02 +00:00