aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix Issues reported by PVS-Studio static analyzernobu2016-07-224-3/+13
| | | | | | | | | | * 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
* * string.c (String#dump): Change escaping of non-ASCII characters induerst2016-07-223-4/+31
| | | | | | | | | 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
* Fix a typokou2016-07-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrongkou2016-07-222-1/+8
| | | | | | | | | 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
* * template/unicode_norm_gen.tmpl: Removeduerst2016-07-222-2/+5
| | | | | | | UnicodeNormalize::UNICODE_VERSION at origin [Feature #12546]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * LEGAL: Added entries for files under the USD license.hsbt2016-07-222-0/+66
| | | | | | [Bug #12598][ruby-core:76428][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * LEGAL: Added entry for `lib/rdoc/generator/template/darkfish/css/fonts.css`hsbt2016-07-222-0/+11
| | | | | | [Misc #12550][ruby-core:76255][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: reduce EXEC_TAGnobu2016-07-212-18/+26
| | | | | | | * 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-22svn2016-07-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: set finalizingnobu2016-07-212-2/+7
| | | | | | | * 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
* * missing/strl{cat,cpy}.c: Update latest upstream files.hsbt2016-07-214-124/+82
| | | | | | | [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
* * LEGAL: added file list with CC0 license.hsbt2016-07-212-1/+13
| | | | | | [ruby-core:76254][Bug #12549] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode/data/8.0.0 (svn:ignore): also be ignored dotfiles.usa2016-07-200-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode/data (svn:ignore): after r55701, this directory has versioned ↵usa2016-07-200-0/+0
| | | | | | | | | 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
* enum.c: [DOC] Enumerable#uniq [ci skip]nobu2016-07-201-0/+4
| | | | | | | * 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
* NEWS: Enumerable#uniq [ci skip]nobu2016-07-201-0/+5
| | | | | | | * 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
* Fix commit misskazu2016-07-201-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-07-21svn2016-07-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2016-07-202-4/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enumerator.c: Enumerator::Lazy#uniqnobu2016-07-203-1/+45
| | | | | | | * 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
* enum.c: Enumerable#uniqnobu2016-07-203-0/+55
| | | | | | | * 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-20svn2016-07-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: rb_hash_add_new_elementnobu2016-07-204-6/+35
| | | | | | | | | * 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
* * lib/unicode_normalize/tables.rb: Removeduerst2016-07-192-2/+5
| | | | | | | UnicodeNormalize::UNICODE_VERSION (#12546). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: exclude private constantsnobu2016-07-193-1/+8
| | | | | | | * 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-19svn2016-07-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-07-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c, complex.c: Add finite? and infinite? consistent with Floatmrkn2016-07-177-0/+170
| | | | | | | | | | | | | | | | | | | | | | * 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
* Move generated headers to unicode data directorynobu2016-07-176-30/+57
| | | | | | | * 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-17svn2016-07-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def: tabify [ci skip]shyouhei2016-07-171-24/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: INCFLAGSnobu2016-07-163-2/+3
| | | | | | | | | * 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
* * time.c (time_arg): revert r55688 beause it had no effect. retry...usa2016-07-152-7/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: directory timestampsnobu2016-07-153-6/+14
| | | | | | | | * 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-16svn2016-07-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r55693 because it broke building on all platforms (and had no ChangeLog).usa2016-07-152-6/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: directory timestampsnobu2016-07-152-4/+6
| | | | | | | | * 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
* * string.c (str_buf_cat): Fix potential interger overflow of capa.ngoto2016-07-152-2/+8
| | | | | | | 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
* * string.c (str_buf_cat): Fix capa size for embed string.ngoto2016-07-152-1/+6
| | | | | | | Fix bug in r55547. [Bug #12536] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gems/bundled_gems: update latest gems.hsbt2016-07-152-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* util.c: do not underflownobu2016-07-153-1/+8
| | | | | | | | * 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
* * time.c (time_arg): it seems that this function sometimes causes SEGVusa2016-07-152-0/+7
| | | | | | | | 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
* enc/unicode: check Unicode versionsnobu2016-07-155-28/+61
| | | | | | | * 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
* string.c: reduce malloc overhead for default buffer sizenormal2016-07-142-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* enc-unicode.rb: check Unicode versionnobu2016-07-141-7/+25
| | | | | | | * 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
* Download Unicode files just once [ci skip]nobu2016-07-141-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-07-15svn2016-07-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* SVK is deadkazu2016-07-140-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove empty directorykazu2016-07-140-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: prefix for nmakenobu2016-07-141-1/+2
| | | | | | | * common.mk (incs): prefix to enc/unicode/name2ctype.h and enc/jis/props.h for nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e