aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Makefile.sub: update enc/unicode/name2ctype.hnobu2016-07-141-5/+0
| | | | | | * win32/Makefile.sub (enc/unicode/name2ctype.h): remove stale recipe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: update enc/unicode/name2ctype.hnobu2016-07-146-85806/+19
| | | | | | | | | | * Makefile.in (enc/unicode/name2ctype.h): remove stale recipe, which did not support Unicode age properties. * common.mk (enc/unicode/name2ctype.h): update by --header option of tool/enc-unicode.rb. enc/unicode/name2ctype.kwd file has not been used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* make-snapshot: fix VPATH regexp [ci skip]nobu2016-07-141-1/+1
| | | | | | | | * tool/make-snapshot (package): replace nmake style VPATH in common.mk by regexp same as one for uncommon.mk, not to replace too much, BEGIN and END in awk and ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: rule for name2ctype.kwdnobu2016-07-143-5/+34
| | | | | | | * common.mk (enc/unicode/name2ctype.kwd): rule to create from Unicode data files, used only when the target does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* json/ext: remove stale directorynobu2016-07-142-1/+6
| | | | | | | | * ext/json/lib/json/ext: remove stale directory. bundled extension libraries are placed under the directory for each architectures, but not mixed with plain text script libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Unicode version checknobu2016-07-141-0/+5
| | | | | | * common.mk (RBCONFIG): check if Unicode versions match. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2016-07-141-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-07-14svn2016-07-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/**/*.rb: merge original files from upstream repository.hsbt2016-07-1421-21/+21
| | | | | | It only fixes styles of frozen string literal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix file name in comment againkazu2016-07-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/json/json_common_interface_test.rb: use assert_raise instead ofhsbt2016-07-132-3/+8
| | | | | | assert_raises. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2016-07-130-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/test/unit.rb: added test files with `_test` suffix for jsonhsbt2016-07-1313-63/+43
| | | | | | | upstream. * test/json: merge original test files from json upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/iso_8859_9.c, test/ruby/enc/test_case_comprehensive.rb:duerst2016-07-134-5/+70
| | | | | | | | | | | Implement non-ASCII case conversion for ISO-8859-9, by Kazuki Iijima. * enc/iso_8859_9.c: Exclude dotless i/I with dot from case-insensitive matching because they are not a case pair. * test/ruby/enc/test_iso_8859.rb: Make test coverage for ISO-8859-9 a bit more complete. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/windows_1252.c, test/ruby/enc/test_case_comprehensive.rb:duerst2016-07-133-4/+59
| | | | | | | | Implement non-ASCII case conversion for Windows-1252, by Serina Tai. * test/ruby/enc/test_case_comprehensive.rb: Fix order of encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/iso_8859_7.c, test/ruby/enc/test_case_comprehensive.rb:duerst2016-07-133-2/+65
| | | | | | | | Implement non-ASCII case conversion for ISO-8859-7, by Kosuke Kurihara. * test/ruby/enc/test_case_comprehensive.rb: Fix order of encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_roots): should mark the VM object itself to markko12016-07-133-1/+18
| | | | | | | | | | | | singleton class of the VM object. Before this patch, we only set mark bit for the VM object and invoke mark function separately. [Bug #12583] * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * math.c (_USE_MATH_DEFINES): it must be set before including internal.husa2016-07-132-1/+9
| | | | | | | | | | because internal.h includes ruby.h, ruby.h includes win32.h, and win32.h includes system's math.h. this change is to get rid of a compiler warning (redefinition of a macro) introduced at r55641. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix file names in commentsnobu2016-07-135-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/iso_8859_1.c, enc/iso_8859_4.c: Avoid setting modification flag ifduerst2016-07-133-6/+8
| | | | | | | there is no modification. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typenaruse2016-07-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/iso_8859_5.c, test/ruby/enc/test_case_comprehensive.rb:duerst2016-07-133-9/+50
| | | | | | | | Implement non-ASCII case conversion for ISO-8859-5, by Masaru Onodera. * test/ruby/enc/test_case_comprehensive.rb: Fix order of encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * math.c (rb_math_sqrt): r55646 must use f_signbit.naruse2016-07-132-1/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (Init_ISeq): undef ISeq.translate and ISeq.load_iseqko12016-07-133-0/+27
| | | | | | | | | | | | | | | | to prevent calling super classes' methods. Without this patch, you can write workaround like: class << RubyVM::InstructionSequence def translate; end undef translate end * test/ruby/test_iseq.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e