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

44107 Коммитов

Автор SHA1 Сообщение Дата
normal dafeebf12d webrick: filter out HTTP_PROXY for CGIHandler
* lib/webrick/httpservlet/cgihandler.rb (do_GET): delete HTTP_PROXY
* test/webrick/test_cgi.rb (test_cgi_env): new test
* test/webrick/webrick.cgi (do_GET): new endpoint to dump env
  [ruby-core:76511] [Bug #12610]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 16:43:12 +00:00
hsbt ef41381d2e * ChangeLog: Fix wrong license name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 14:23:12 +00:00
nobu a325876ad3 Fix Issues reported by PVS-Studio static analyzer
* vm.c (vm_set_main_stack): remove unnecessary check.  toplevel
  binding must be initialized.  [Bug #12611] (N1)
* win32/win32.c (w32_symlink): fix return type.  [Bug #12611] (N3)
* string.c (rb_str_split_m): simplify the condition.
  [Bug #12611](N4)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 10:55:22 +00:00
duerst c6692d9410 * string.c (String#dump): Change escaping of non-ASCII characters in
UTF-8 to use upper-case four-digit hexadecimal escapes without braces
  where possible [Feature #12419].
* test/ruby/test_string.rb (test_dump): Add tests for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 08:13:38 +00:00
kou 21269d37a1 Fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 01:43:17 +00:00
kou 95c78413f9 * lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrong
entry reference name of double quote.
  [Bug#12609][ruby-core:76509]
  Patch by Joseph Marrero. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 01:39:49 +00:00
duerst 0ad3557d81 * template/unicode_norm_gen.tmpl: Remove
UnicodeNormalize::UNICODE_VERSION at origin [Feature #12546].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 01:32:20 +00:00
hsbt 8c18d58557 * LEGAL: Added entries for files under the USD license.
[Bug #12598][ruby-core:76428][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 00:24:01 +00:00
hsbt a19f4c6fb9 * LEGAL: Added entry for `lib/rdoc/generator/template/darkfish/css/fonts.css`
[Misc #12550][ruby-core:76255][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-22 00:20:10 +00:00
nobu 2fbb1dca4e gc.c: reduce EXEC_TAG
* gc.c (run_finalizer): push and exec tag just once, instead of
  protecting for each finalizer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-21 21:28:34 +00:00
svn 3f4acc0e90 * 2016-07-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-21 21:12:54 +00:00
nobu 2a32bd36ea gc.c: set finalizing
* gc.c (gc_start_internal, rb_gc_start): set finalizing flag
  whenever calling deferred finalizers not to recurse.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-21 21:12:53 +00:00
hsbt 0b8590724d * missing/strl{cat,cpy}.c: Update latest upstream files.
[Misc #12205][ruby-core:74487]
* LEGAL: Update license for missing/strl{cat,cpy}.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-21 13:27:02 +00:00
hsbt e84f9113ea * LEGAL: added file list with CC0 license.
[ruby-core:76254][Bug #12549]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-21 12:54:09 +00:00
usa 6a4e772bc5 * enc/unicode/data/8.0.0 (svn:ignore): also be ignored dotfiles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 23:25:11 +00:00
usa 1d2b3f130b * enc/unicode/data (svn:ignore): after r55701, this directory has versioned data.
* enc/unicode/data/8.0.0 (svn:ignore): ignore downloaded files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 22:52:14 +00:00
nobu e9f61faa4b enum.c: [DOC] Enumerable#uniq [ci skip]
* enum.c (enum_uniq): add rdoc, reference to Array#uniq.
  [Feature #11090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 21:15:19 +00:00
nobu 39622db005 NEWS: Enumerable#uniq [ci skip]
* NEWS: mention Enumerable#uniq and Enumerator::Lazy#uniq.
  [Feature #11090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 21:00:30 +00:00
kazu f477d5e27a Fix commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 16:00:12 +00:00
svn f09afc296f * 2016-07-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 15:59:00 +00:00
kazu 14a145095f fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 15:58:59 +00:00
nobu 6882b35460 enumerator.c: Enumerator::Lazy#uniq
* enumerator.c (lazy_uniq): new method Enumerator::Lazy#uniq.
  [Feature #11090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 08:44:08 +00:00
nobu 42c6a5137e enum.c: Enumerable#uniq
* enum.c (enum_uniq): new method Enumerable#uniq.
  [Feature #11090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 08:39:12 +00:00
svn f14d64638a * 2016-07-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 08:35:26 +00:00
nobu aa0e51b529 hash.c: rb_hash_add_new_element
* hash.c (rb_hash_add_new_element): add new element or do nothing
  if it is contained already.
* array.c (ary_add_hash, ary_add_hash_by): use
  rb_hash_add_new_element.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-20 08:35:25 +00:00
duerst 306b64bd1a * lib/unicode_normalize/tables.rb: Remove
UnicodeNormalize::UNICODE_VERSION (#12546).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-19 09:21:18 +00:00
nobu 6ea002a7a2 variable.c: exclude private constants
* variable.c (rb_local_constants_i): exclude private constants
  when excluding inherited constants too.  [Bug #12345]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-19 06:39:01 +00:00
svn 0fc6877ed5 * 2016-07-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-18 16:01:53 +00:00
kazu 04ddf45c3f fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-18 16:01:52 +00:00
mrkn 94468b4ea5 numeric.c, complex.c: Add finite? and infinite? consistent with Float
* numeric.c (num_finite_p, num_infinite_p): Add Numeric#finite? and
  Numeric#infinite?  [Feature #12039] [ruby-core:73618]

* complex.c (rb_complex_finite_p): Add Complex#finite?

* complex.c (rb_complex_infinite_p): Add Complex#infinite?

* test/ruby/test_bignum.rb: Add test for Integer#finite? and
  Integer#infinite?

* test/ruby/test_fixnum.rb: ditto.

* test/ruby/test_rational.rb: Add test for Rational#finite? and
  Rational#infinite?

* test/ruby/test_complex.rb: Add test for Complex#finite? and
  Complex#infinite?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-17 14:53:00 +00:00
nobu af2d3c9866 Move generated headers to unicode data directory
* common.mk, enc/depend (casefold.h, name2ctype.h): move to
  unicode data directory per version.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-17 11:59:26 +00:00
svn 8cdb719ce0 * 2016-07-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-17 08:40:54 +00:00
shyouhei 0af375124c * insns.def: tabify [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-17 08:40:53 +00:00
nobu ba1d0ea6a8 common.mk: INCFLAGS
* common.mk (INCFLAGS): move from Makefile.in.

* win32/Makefile.sub (XCFLAGS): missing directory is not
  neccessary as an include path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-16 12:41:23 +00:00
usa 8b9f9274c6 * time.c (time_arg): revert r55688 beause it had no effect. retry...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 21:39:57 +00:00
nobu d54856c1d4 common.mk: directory timestamps
* common.mk, enc/Makefile.in: moved timestamp files for
  directories under the specific directory, to get rid of match
  with files under the source directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 21:26:02 +00:00
svn b2275294aa * 2016-07-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 20:24:02 +00:00
usa 251d87583b Revert r55693 because it broke building on all platforms (and had no ChangeLog).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 20:24:01 +00:00
nobu 2ace43ba57 common.mk: directory timestamps
* common.mk, enc/Makefile.in: moved timestamp files for
  directories under the specific directory, to get rid of match
  with files under the source directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 14:08:20 +00:00
ngoto 20c4461d86 * string.c (str_buf_cat): Fix potential interger overflow of capa.
In addition, termlen is used instead of +1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 13:08:54 +00:00
ngoto 2bb292fccf * string.c (str_buf_cat): Fix capa size for embed string.
Fix bug in r55547. [Bug #12536]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 12:35:52 +00:00
hsbt 83a5457fa7 * gems/bundled_gems: update latest gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 09:13:20 +00:00
nobu 5292b2727a util.c: do not underflow
* util.c (ruby_strtod): do not underflow only by preceeding zeros,
  which may be canceled out by the exponent.
  http://twitter.com/kazuho/status/753829998767714305

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 08:08:59 +00:00
usa 363c90853e * time.c (time_arg): it seems that this function sometimes causes SEGV
on mswin CI, then force to prevent `vtm->subsecx` from GC.  this is
  experimental.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 06:35:37 +00:00
nobu e827c334c3 enc/unicode: check Unicode versions
* enc/unicode/case-folding.rb, tool/enc-unicode.rb: check if
  Unicode versions are consistent with each other.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-15 00:53:50 +00:00
normal ed5401a696 string.c: reduce malloc overhead for default buffer size
* string.c (STR_BUF_MIN_SIZE): reduce from 128 to 127
  [ruby-core:76371] [Feature #12025]
* string.c (rb_str_buf_new): adjust for above reduction

From Jeremy Evans <code@jeremyevans.net>:

This changes the minimum buffer size for string buffers from 128 to
127.  The underlying C buffer is always 1 more than the ruby buffer,
so this changes the actual amount of memory used for the minimum
string buffer from 129 to 128.  This makes it much easier on the
malloc implementation, as evidenced by the following code (note that
time -l is used here, but Linux systems may need time -v).

$ cat bench_mem.rb
i = ARGV.first.to_i
Array.new(1000000){" " * i}
$ /usr/bin/time -l ruby bench_mem.rb 128
        3.10 real         2.19 user         0.46 sys
    289080  maximum resident set size
     72673  minor page faults
        13  block output operations
        29  voluntary context switches
$ /usr/bin/time -l ruby bench_mem.rb 127
        2.64 real         2.09 user         0.27 sys
    162720  maximum resident set size
     40966  minor page faults
         2  block output operations
         4  voluntary context switches

To try to ensure a power-of-2 growth, when a ruby string capacity
needs to be increased, after doubling the capacity, add one.  This
ensures the ruby capacity will be odd, which means actual amount
of memory used will be even, which is probably better than the
current case of the ruby capacity being even and the actual amount
of memory used being odd.

A very similar patch was proposed 4 years ago in feature #5875. It
ended up being rejected, because no performance increase was shown.
One reason for that is that ruby does not use STR_BUF_MIN_SIZE
unless rb_str_buf_new is called, and that previously did not have
a ruby API, only a C API, so unless you were using a C extension
that called it, there would be no performance increase.

With the recently proposed feature #12024, String.buffer is added,
which is a ruby API for creating string buffers.  Using
String.buffer(100) wastes much less memory with this patch, as the
malloc implementation can more easily deal with the power-of-2
sized memory usage.  As measured above, memory usage is 44% less,
and performance is 17% better.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 23:30:29 +00:00
nobu 0fd7666d57 enc-unicode.rb: check Unicode version
* tool/enc-unicode.rb (data_foreach): check Unicode version in
  data files, and yield each lines.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 16:32:13 +00:00
nobu 230a91c133 Download Unicode files just once [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 16:30:01 +00:00
svn dcdea1e631 * 2016-07-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 15:35:39 +00:00
kazu 0c5dd98461 SVK is dead
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-14 15:35:38 +00:00