aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pack.c: avoid signed integer overflowwip-topic/pack-integer-overflowKazuki Yamaguchi2016-09-271-7/+20
| | | | | | | | | | * pack.c (pack_pack, pack_unpack): Use strtol() instead of strtoul(), as the length must be in the range of long. This suppresses the implicit type conversion and let it raise a better exception for too large length. * pack.c (pack_unpack): Fix 'b', 'B', 'h', 'H', 'u', 'm' format. Ensure that multiplying does not cause integer overflow.
* string.c: add missing size_t castKazuki Yamaguchi2016-09-271-1/+1
| | | | | * string.c (RESIZE_CAPA_TERM): Add missing size_t cast. This should have been done in r56157.
* Remove Ns before puctuationknu2016-09-265-10/+10
| | | | | | | * man/erb.1, man/irb.1, man/ri.1, man/ruby.1: Remove Ns before puctuation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_exception.rb: another assertionnobu2016-09-261-1/+2
| | | | | | | * test/ruby/test_exception.rb (test_throw_false): test the thrown tag. [Bug #12743] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stringio.c: fix signed integer overflowrhe2016-09-263-6/+30
| | | | | | | | | | | | | * ext/stringio/stringio.c (strio_seek): Avoid signed integer overflow. It's not harmful in practice here, but is still undefined behavior. * ext/stringio/stringio.c (strio_extend): Check that the new length does not exceed LONG_MAX. This fixes the invalid write on the overflow. * test/stringio/test_stringio.rb (test_write_integer_overflow): Add a test case for the above fix in strio_extend(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval_intern.h: make TH_PUSH_TAG() initialize rb_vm_tag::tag with Qundefrhe2016-09-263-1/+21
| | | | | | | | | | | | | * eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with Qundef rather than 0 which is equal to Qfalse. Since Kernel#throw(obj) searches a tag with rb_vm_tag::tag == obj, throw(false) can accidentally find an unrelated tag which is not created by Kernel#catch. [ruby-core:77229] [Bug #12743] * test/ruby/test_exception.rb (test_throw_false): Add a test case for this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb: provide default basename parametersonots2016-09-263-1/+16
| | | | | | | for Tempfile.create. [Feature #11965] Patch by Yuki Kurihara * test/test_tempfile.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fast path of lstrip_offsetnobu2016-09-262-5/+17
| | | | | | | | * string.c (lstrip_offset): add a fast path in the case of single byte optimizable strings, as well as rstrip_offset. [ruby-core:77392] [Feature #12788] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* minitest-5.9.1nobu2016-09-262-0/+5
| | | | | | * gems/bundled_gems: update to minitest-5.9.1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rbinstall.rb: don't install gemspec for skipped librariesrhe2016-09-262-25/+16
| | | | | | | | * tool/rbinstall.rb (gem): Don't install gemspec if no files will be installed for the gem. This happens when the extension library is not compiled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix integer overflow in enc_strlen() and rb_enc_strlen_cr()rhe2016-09-262-2/+17
| | | | | | | | | | | | | | | * string.c (enc_strlen, rb_enc_strlen_cr): Avoid signed integer overflow. The result type of a pointer subtraction may have the same size as long. This fixes String#size returning an negative value on i686-linux environment: str = "\x00" * ((1<<31)-2)) str.slice!(-3, 3) str.force_encoding("UTF-32BE") str << 1234 p str.size git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-09-26svn2016-09-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_dln.rb: fix constantsnobu2016-09-251-8/+8
| | | | | | | * test/-ext-/win32/test_dln.rb (test_check_imported): use toplevel constants explicitly to get rid of constants under the scope. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_args.c: split make_unused_kw_hashnobu2016-09-251-10/+19
| | | | | | | * vm_args.c (make_unknown_kw_hash, make_rest_kw_hash): split make_unused_kw_hash for key_only parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove unnecessary :stag accessornobu2016-09-252-1/+6
| | | | | | | | * lib/erb.rb (ERB::Compiler::TrimScanner#stag): The :stag accessor has already been available because it is defined in parent Scanner class. [Fix GH-1445] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: trivial optimizationnobu2016-09-251-4/+3
| | | | | | * proc.c (rb_proc_arity): reduce repeated GetProcPtr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-09-25svn2016-09-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.c (dump_array): remove duplicate header of NODE_ARRAY/ktsj2016-09-252-1/+5
| | | | | | NODE_VALUES. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: build zlib togethernobu2016-09-241-7/+1
| | | | | | | * appveyor.yml (install): extract zlib source under ext/zlib and build within the build process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* install extra librariesnobu2016-09-244-11/+48
| | | | | | | | | * ext/extmk.rb (extract_makefile, extmake, configuration): store extra libraries to be installed. * tool/rbinstall.rb (ext-arch): install extra libraries. * ext/zlib/extconf.rb: install zlib if built. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use OpenSSL-Win64nobu2016-09-241-8/+2
| | | | | | * appveyor.yml (install): use pre-installed OpenSSL-Win64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use TESTOPTS instead of OPTS for testsnobu2016-09-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Download by AppVeyornobu2016-09-241-2/+2
| | | | | | | | * appveyor.yml (install): use AppVeyor command-line utility to download files, instead of Start-FileDownload cmdlet which no longer works more than once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * spec/README: update URL. [ci skip]kazu2016-09-242-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fid typos [ci skip]nobu2016-09-2411-14/+17
| | | | | | * fix typos, "a" before "Integer" to "an". [Fix GH-1438] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_ruby_mode.rb: fix for Emacs 25.1nobu2016-09-242-2/+11
| | | | | | | | | * test/misc/test_ruby_mode.rb (assert_indent): since write-region in Emacs 25.1 no longer displays the "Wrote file" message, shows the explicit message to check if successfully finished. [ruby-core:77355] [Bug #12785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-09-24svn2016-09-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_ruby_mode.rb: save-buffer 0nobu2016-09-242-7/+12
| | | | | | | | | | * test/misc/test_ruby_mode.rb (EXPR_SAVE): use a numeric prefix argument of 0, not to make the previous version into a backup file, instead of backup-inhibited. * test/misc/test_ruby_mode.rb (run_emacs): always save the buffer if modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_method.c (make_method_entry_refined): fix wrong use of ||.shugo2016-09-232-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* zlib: no checks [ci skip]nobu2016-09-231-3/+9
| | | | | | | * ext/zlib/extconf.rb: no feature checks when building zlib from the source, assume it is recent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* zlib: fix directory [ci skip]nobu2016-09-231-1/+1
| | | | | | * ext/zlib/extconf.rb: fix directory to install zlib library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add support for the `Lk` macro to tool/mdoc2man.rbknu2016-09-232-10/+50
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forwardable.rb: remove debug printnobu2016-09-231-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove a garbage file.shugo2016-09-231-13/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2016-09-230-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-09-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_mod_refine): refine modules as well.shugo2016-09-235-14/+93
| | | | | | [ruby-core:76199] [Feature #12534] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update the paragraphs in "Rich Libraries" which included a dead linkknu2016-09-232-5/+20
| | | | | | | * man/ruby.1: Update the paragraphs in "Rich Libraries" which included a dead link. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use the `Lk` macro for hyperlinksknu2016-09-235-9/+19
| | | | | | | | * man/ruby.1, man/erb.1, man/irb.1, man/ri.1: Use the `Lk` macro for hyperlinks, which has been available since mdocml 1.5.1 (released more than seven years ago). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forwardable.rb: private methodsnobu2016-09-232-13/+29
| | | | | | | * lib/forwardable.rb (_delegator_method): allow private methods to be delegated, with warnings. [ruby-core:77341] [Bug #12782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_fileutils.rb: use Dir.mktmpdirnobu2016-09-231-6/+3
| | | | | | | * test/fileutils/test_fileutils.rb: use Dir.mktmpdir instead of fixed name for temporary directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: tailcall in conditinal blocknobu2016-09-232-0/+12
| | | | | | | * compile.c (iseq_peephole_optimize): enable tail call optimization inside a conditional block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-09-23svn2016-09-231-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ignore all versions [ci skip]nobu2016-09-231-1/+1
| | | | | | .gitignore: ignore all versions of unicode data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sync with svn:ignore. see r56105 [ci skip]kazu2016-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* zlib: try zlib sourcenobu2016-09-221-1/+33
| | | | | | | * ext/zlib/extconf.rb: try building zlib from the source if exists. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dlntest.dll: movenobu2016-09-223-6/+10
| | | | | | | | | | * ext/-test-/win32/dln/{depend,extconf.rb} (dlntest.dll): make under the extension directory, instead of the top directory. * test/-ext-/win32/test_dln.rb (test_check_imported): explicit PATH environment variable to load the DLL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-09-22svn2016-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: fix rdoc of garbage_collect [ci skip]kazu2016-09-222-1/+7
| | | | | | | * gc.c (gc_start_internal): [DOC] methods without arguments like r56194. [Bug #12777] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (InitVM_process): Support CLOCK_MONOTONIC_RAW_APPROX,naruse2016-09-212-5/+23
| | | | | | | CLOCK_UPTIME_RAW, and CLOCK_UPTIME_RAW_APPROX which are introduced by macOS 10.12. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e