* bignum.c (bigmul0): disable big_mul_toom3_temporalily.
  [ruby-core:48552] [Bug #7242]

* test/ruby/test_bignum.rb (test_mul_large_numbers):
  add a test for bigmul1_toom3 suggested in [Bug #7242].

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2012-11-09

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (bigmul0): enable big_mul_toom3.
  [ruby-core:48552] [Bug #7242]

* bignum.c (bigmul1_toom3): fix incorrect calculation.
  the patch is made by Heesob Park.
  [ruby-core:48552] [Bug #7242]

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (IO#new):
  Fix indentation from r37444
  [ruby-core:48052] [Bug #7179]


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typos


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fix build when gcc is used and the platform's libc lacks alloca().

* include/ruby/ruby.h (alloca), eval_intern.h (alloca), gc.c
  (alloca): Make alloca() globally available by moving the
  ultimate ifdef's to ruby/ruby.h.  Gcc hides its builtin alloca()
  when compiling with -ansi, and linking thus fails on platforms
  that lack their own alloca() implementation in libc, which
  include OpenBSD and some ports of NetBSD.  We use alloca()
  everywhere including from within third party C extentions, so
  alloca() must be made globally available. [Bug #7307]

* addr2line.c (alloca): Replace the alloca() part with the
  ultimate ifdef's. [Bug #7307]

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_crypt): crypt(3) may return NULL.
  Latest glibc (2.16?) crypt(3) actually returns NULL. [Bug #7312]

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fix an example of Shellwords#shellescape.

* lib/shellwords.rb (Shellwords#shellescape): Undo part of the
  previous rdoc change.  This new example using a string-only
  array was not in line with the description.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Add back my original example of Shellwords#shellescape.

* lib/shellwords.rb (Shellwords#shellescape): Add back my original
  real world example with some enhancement.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (warn_balanced): use bit-wise operation.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/bigdecimal/bigdecimal.c:
  Documentation for BigDecimal
  Based on a patch from Vincent Batts
  [ruby-core:49047] [Bug #7305]



git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
array.c: steal shared array's container when ARY_SHARED_NUM == 1

* array.c (rb_ary_modify): steal shared array's container when
  ARY_SHARED_NUM == 1.  [Feature #6638]
  - Do not allocate new memory in rb_ary_modify when ARY_SHARED_NUM == 1
    and length almost same.
  - Store ARY_CAPA instead of RARRAY_LEN in ary_make_shared, to make
    it useful.
  - Fix rb_ary_sort_bang accordantly.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
array.c: make array really suitable for queue

* array.c (ary_ensure_room_for_push): make array really suitable for
  queue.  [Feature #6638]
  when array is shared (which happens after Array#shift), and
  ARY_SHARED_NUM == 1 (which is very often when array used as queue),
  then make rb_ary_push push directly into shared array.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
array.c: use shared array in rb_ary_slice

* array.c (rb_ary_splice): use shared array in rb_ary_slice.
  [Feature #6638]
  - use ary_ensure_room_for_push when rb_ary_slice used to add at the
    end of array, cause rb_ary_concat use rb_ary_slice.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
array.c: speedup Array#unshift by using space in shared array

* array.c: speedup Array#unshift by using space in shared array.
  [Feature #6638]
  - when array owns its shared array (ARY_SHARED_NUM == 1), and there
    is enough space then try unshift values directly into shared
    array.
  - when resulting array is big (~>64 items) then make it shared with
    enough room for future #unshifts, and then insert into shared
    array.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
siphash

* random.c (rb_memhash): use siphash.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Use C90 comment style

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_splice): fix r37583 doesn't condier the case when
  beg > array length.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typos


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typos

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@37590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e