Граф коммитов

31851 Коммитов

Автор SHA1 Сообщение Дата
svn 6a7fd8cbe7 * 2013-07-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 17:21:36 +00:00
nobu 2dc7d111f8 encoding.c: encoding at inspect
* encoding.c (enc_inspect): use PRIsVALUE to preserve the result
  encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 17:21:36 +00:00
nobu f2dc5f15ba encoding.c: terminator in enc_set_index
* encoding.c (enc_set_index): deal with terminator so that
  rb_enc_set_index also works.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 17:21:32 +00:00
akr 240f3056aa * configure.in: Check __builtin_popcountl, __builtin_bswap32 and
__builtin_bswap64.

* internal.h (swap32): Use the configure result for the condition to
  use __builtin_bswap32.
  (swap64): Use the configure result for the condition to use
  __builtin_bswap64.

* bignum.c (ones): Use the configure result for the condition to use
  __builtin_popcountl.
  (bary_unpack_internal): Use appropriate types for swap argument.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 14:28:33 +00:00
akr b0eacd027a * bignum.c (bary_subb): Support xn < yn.
(bigsub_core): Removed.
  (bigsub): Don't compare before subtraction.  Just subtract and
  get the two's complement if the subtraction causes a borrow.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-14 13:24:44 +00:00
akr 651f762c17 * bignum.c (DIGSPERLONG): Unused macro removed.
(DIGSPERLL): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 15:38:52 +00:00
akr 75a86e4733 * bignum.c (rb_big_aref): Less scan when the number is negative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 15:36:18 +00:00
akr b9eeeac5c8 * bignum.c (big_shift): Avoid signed integer overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 15:19:48 +00:00
svn 74c6e2af74 * 2013-07-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 15:16:27 +00:00
akr f9029004ee * bignum.c (bary_mul_precheck): Use bary_small_lshift or
bary_mul_normal if xl is 1.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 15:16:23 +00:00
akr de79b66f46 * bignum.c (big_shift3): New function.
big_lshift and big_rshift are merged.
  (big_shift2): New function.
  (big_lshift): Use big_shift3.
  (big_rshift): Ditto.
  (check_shiftdown): Removed.
  (rb_big_lshift): Use big_shift2 and big_shift3.
  (rb_big_rshift): Ditto.
  (big_lshift): Removed.
  (big_rshift): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 14:03:13 +00:00
akr 0001cf6bdc * bignum.c (bary_small_lshift): Use size_t instead of long.
(bary_small_rshift): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 06:53:12 +00:00
akr e31c9896d6 * bignum.c (bary_small_lshift): Functions moved to remove
declaration.
  (bary_small_rshift): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 06:36:40 +00:00
nobu 245d964e8a * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 03:28:09 +00:00
nobu 1ae7e6b654 encoding.c: new termlen not oldtermlen
* encoding.c (rb_enc_associate_index): fill new terminator length, not
  old one.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 03:27:37 +00:00
nobu 771d31ace2 ext/win32: move
* ext/win32: move from ext/dl and ext/fiddle.  since ext/extmk.rb
  builds extensions in alphabetical order, compiled?('fiddle') under
  ext/dl makes no sense.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 03:24:28 +00:00
akr 725bc0c870 * bignum.c (biglsh_bang): Removed.
(bigrsh_bang): Ditto.
  (bigmul1_toom3): Use bary_small_lshift and bary_small_rshift.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13 00:28:10 +00:00
svn a82f8c786e * 2013-07-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 16:05:42 +00:00
zzak 5de05f57b1 * lib/rubygems/psych_additions.rb: Ignore Psych docs here
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 16:05:38 +00:00
usa e9ce31bf68 * ext/fiddle/win32/lib/win32/registry.rb
(Win32::Registry::API#make_wstr): same as r41922.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 09:11:25 +00:00
nobu 342259a328 signal.c: for valgrind
* signal.c (ruby_signal): suppress valgrind error in
  install_sighandler().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 07:37:31 +00:00
nobu 8b8cce322b encoding.c: refill terminator at associating encoding
* encoding.c (rb_enc_associate_index): refill the terminator if it
  becomes longer than before.  [ruby-dev:47500] [Bug #8624]
* string.c (str_null_char, str_fill_term): get rid of out of bound
  access.
* string.c (rb_str_fill_terminator): add a parameter for the length of
  new terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 07:28:40 +00:00
glass bc241235ac * hash.c (rb_hash_reject_bang): do not call rb_hash_foreach() if RHash
has ntbl and it is empty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 02:35:16 +00:00
glass b9a9a02409 * hash.c (recursive_hash): use RHASH_SIZE() to check hash size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-12 02:22:01 +00:00
glass 7a171aa8d1 * hash.c (rb_hash_size): use RHASH_SIZE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 15:25:31 +00:00
glass 76a400ff71 * hash.c (rb_hash_values): set array capa to RHASH_SIZE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 15:09:56 +00:00
svn 9ae1b8f96b * 2013-07-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 15:06:27 +00:00
glass c459495c77 * hash.c (rb_hash_keys): set array capa to RHASH_SIZE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 15:06:18 +00:00
nobu 3c9e6f1e62 win32.c: fix infinite recursion
* win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
  recursive call.  re-fix [Bug #8495].  [ruby-core:55923] [Bug #8621]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 12:30:24 +00:00
nobu 4997572f7e win32/registry.rb: remove workaround
* ext/dl/win32/lib/win32/registry.rb (Win32::Registry::API#make_wstr):
  remove workaround to append WCHAR terminator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 11:18:15 +00:00
nobu 18030d18cf transcode.c: fill terminator
* transcode.c (str_encode_associate): fill terminator after conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 11:18:10 +00:00
nobu 1549894a06 string.c: multi-byte terminator
* string.c (rb_enc_str_new, rb_str_set_len, rb_str_resize): fill
  minimum length of the encoding as the terminator.
* string.c (str_buf_cat, rb_str_buf_append, rb_str_splice_0): ditto.
* string.c (str_make_independent_expand, rb_str_modify_expand): make
  the capacity enough for multi-byte terminator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 11:18:05 +00:00
nobu b271a8c98d string.c: multi-byte terminator
* string.c (rb_string_value_cstr): fill minimum length of the encoding
  as the terminator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 11:17:59 +00:00
nobu db3ddad3a7 string.c: check null char
* string.c (rb_string_value_cstr): check null char in char, not in
  byte.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 11:17:54 +00:00
zzak be698dbc66 * array.c: Replace confusing example for #reverse_each in overview
Patch by Earl St Sauver [Fixes documenting-ruby/ruby-12]
  https://github.com/documenting-ruby/ruby/pull/12


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 05:51:19 +00:00
zzak c1f78cc685 * test/drb/ut_eq.rb: Use localhost for drb tests [Bug #7311]
Patch by Vit Ondruch [ruby-core:49101]
* test/drb/ut_array.rb: ditto
* test/drb/ut_array_drbssl.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 05:24:32 +00:00
zzak ed0736ddda * sprintf.c: Fix typo patch by @hynkle [Fixes GH-357]
https://github.com/ruby/ruby/pull/357


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 04:49:33 +00:00
zzak 84247a63ce * lib/securerandom.rb: Refactor conditions by Rafal Chmiel
[Fixes GH-326] https://github.com/ruby/ruby/pull/326


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 04:01:47 +00:00
akr 973d855391 * bignum.c: Don't use toom3 after once karatsuba is choosen.
(mulfunc_t): New type.
  (bary_mul_toom3_start): Renamed from bary_mul.
  (bary_mul_karatsuba_start): Renamed from bary_mul.
  (bary_mul_balance_with_mulfunc): Renamed from bary_mul_balance and
  new argument, mulfunc, is added.
  (rb_big_mul_balance): Invoke bary_mul_balance_with_mulfunc with
  bary_mul_toom3_start.
  (bary_mul_karatsuba): Invoke bary_mul_karatsuba_start instead of
  bary_mul.
  (bary_mul_precheck): Extracted from bary_mul.
  (bary_mul_karatsuba_branch): Extracted from bary_mul.
  (bary_mul_karatsuba_start): New function to call bary_mul_precheck
  and bary_mul_karatsuba_branch.
  (bary_mul_toom3_branch): Extracted from bary_mul.
  (bary_mul_toom3_start): New function to call bary_mul_precheck and
  bary_mul_toom3_branch.
  (bary_mul): Just call bary_mul_toom3_start.
  Arguments for work memory are removed.
  (rb_cstr_to_inum): Follow the bary_mul change.
  (bigmul0): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 03:06:02 +00:00
nobu 9e2fc969e2 probes_to_wiki.rb: fix comment and reduce unnecessary array
* tool/probes_to_wiki.rb: fix usage comment.  use Enumerable#grep
  which yields each elements to reduce unnecessary array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 01:46:40 +00:00
naruse e2a17dad48 call GC.start before fork-related tests to decrease GC cost on fork children
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 01:31:23 +00:00
naruse 300b7c80e4 * process.c (rb_daemon): daemon(3) is implemented with fork(2).
Therefore it needs rb_thread_atfork(). (and revert r41903)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11 01:13:10 +00:00
nobu f328b9d0d5 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 18:23:40 +00:00
tenderlove 4580394abb * tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
format for easy wiki updates.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 18:22:52 +00:00
zzak cd22445281 * man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 15:55:12 +00:00
zzak 0357488b43 * lib/delegate.rb: Add example for __setobj__ and __getobj__
[Bug #8615] Patch by Caleb Thompson


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 15:50:23 +00:00
svn e82591d0ca * 2013-07-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 15:36:12 +00:00
naruse 843f3a6564 On FreeBSD, threads don't die on daemon(3)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 15:36:06 +00:00
zzak 30ce930f37 * lib/logger.rb: Use :call-seq: for method signature rdoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 14:30:12 +00:00
zzak fef0a7deaf * lib/logger.rb (#add): Remove incorrect rdoc for return value
[Bug #8567] Reported by Tim Pease.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10 14:25:06 +00:00