summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-24merge revision(s) 59444,59445: [Backport #13776]nagachika
adjust indent [ci skip] * vm_insnhelper.c (vm_call_method_each_type): adjust indent of a block in switch. visibility of inherited method * vm_insnhelper.c (vm_call_method_each_type): honor the original visibility of inherited methods when a refinement is defined but not activated. [ruby-core:82209] [Bug #13776] Author: Mon_Ouie (Mon ouie) <[email protected]> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22merge revision(s) 57971: [Backport #13305]nagachika
Fix a consistency bug of ISEQ_COVERAGE [Bug #13305] There is an invariant that ISEQ_COVERAGE(iseq) must be Qnil if and only if option->coverage_enabled is false. This invariant was broken by NODE_PRELUDE which updates option->coverage_enabled but not ISEQ_COVERAGE(iseq). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 60021: [Backport #13926]nagachika
HTTPHeader#add_field should allow binary [Bug #13926] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 58410,58411: [Backport #13487]nagachika
ri.1: rewrite ri man page * man/ri.1: update the (very outdated) ri man page: * update document date * fix document title formatting and volume name * update descriptions and options to current ri --help text * fix some mdoc formatting errors (missing escaping of `\', wrong macro for bullet list items) * various rewordings and other improvements improve man pages * man/ruby.1, man/erb.1, man/goruby.1, man/irb.1: fix document title formatting and volume name, improve "REPORTING BUGS" section: fix mdoc formatting error (wrong macro for bullet list items), small rewordings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 59372: [Backport #13649]nagachika
lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server Based on the patch by keysen (Jeremy Carlier). [ruby-core:81641] [Bug #13649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 58208: [Backport #13386]nagachika
Add documents on Process::CLOCK_* constants * process.c: Add documents on Process::CLOCK_* constants. Patch by Sunao Komuro <[email protected]>. Closes [GH-1567] [Bug #13386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 58146,58150,58156: [Backport #13276]nagachika
error.c: refactor warning messages * error.c (with_warning_string): extract building warning message string from variadic arguments. * error.c (syserr_warning): write warning message with the system error message. error.c: warning functions * error.c: define warning functions in all combinations of * no errno, system errno, argument * without/with encoding * enabled/disabled by default dir.c: err at glob failure * dir.c (glob_helper): raise a SystemCallError exception when opendir() failed, except for ENOENT, ENOTDIR, and EACCES. this behavior predates 1.0; the comments in glob.c claimed that glob() returned -1 on error but actualy the pointer to a global variable, then dir_glob() did check only -1 as the comments, and ignored actual errors. [ruby-core:80226] [Bug #13276] dir.c: ruby_glob_funcs_t git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 58409: [Backport #10838]nagachika
ri.1: fix errors in ri man page * man/ri.1: fix some errors in ri man page (add missing options, remove options that do not exist, fix formatter list). Reported by Josh Cheek. [ruby-core:68065] [Bug #10838] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 58020: [Backport #10936]nagachika
date_core.c: fix error in DateTime docs * ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339. Reported by Andreas Rayo Kniep. [ruby-core:68418] [Bug #10936] * ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and DateTime#xmlschema; other small improvements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 57887: [Backport #13159]nagachika
lib/ostruct.rb: [DOC] revise docs for OpenStruct * update paragraph on implementation: define_singleton_method is used, not define_method * add call-seq with return values for each_pair * adopt description of dig from Array and Hash * fix description of the hash method * :nodoc: initialize_copy, respond_to_missing? * other small improvements, e.g. use the term `attribute' in the docs (instead of `member'), which is clearer for users of the class * improve code examples: e.g. use more consistent style (always use double quotes, drop `p' and `puts', ...), update inspect output, use example data that is not prone to change (like population) * add more code examples * fix some small errors and grammar [ruby-core:79265] [Bug #13159] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 57686: [Backport #13233]nagachika
rational.c: fix rdoc * rational.c: [DOC] fix wrong indentations and comment out some lines in code examples to make them valid Ruby code and syntax highlighted on the rendered page. [ci skip] [ruby-core:79607] [Bug #13233] Author: Marcus Stollsteimer <[email protected]> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 57536: [Backport #13192]nagachika
doc: Add example for Symbol#to_s * string.c: add example for Symbol#to_s. The docs for Symbol#to_s only include an example for Symbol#id2name, but not for #to_s which is an alias; the docs should include examples for both methods. From: Marcus Stollsteimer <[email protected]> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 57649,57651: [Backport #13222]nagachika
array.c: finish_exact_sum * array.c (finish_exact_sum): extract duplicate code from rb_ary_sum. array.c: check if numeric * array.c (finish_exact_sum): add 0 and the initial value to check if the latter is numeric. [ruby-core:79572] [Bug #13222] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20merge revision(s) 60182: [Backport #14009]nagachika
configure.ac: link Foundation framework * configure.ac (XLDFLAGS): link against Foundation framework and let __NSPlaceholderDictionary initialize, to get rid of crash after fork on macOS High Sierra. [ruby-core:83239] [Bug #14009] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18merge revision(s) 59748: [Backport #14073]nagachika
st.c: fix num_entries * st.c (st_insert2): should manage num_entries when the key is undefined, as well as st_insert(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-16bump up teeny version to 2.4.4.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14merge revision(s) 61242: [Backport #14185]nagachika
Fix a command injection vulnerability in Net::FTP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14merge revision(s) 60123,60172,60189,60208,60210,60211: [Backport #14005]nagachika
webrick: avoid unnecessary IO#sync= call Sockets and pipes are always created with FMODE_SYNC flag already set (otherwise many things would be broken). * lib/webrick/server.rb (accept_client): remove unnecessary IO#sync= call webrick: do not hang acceptor on slow TLS connections OpenSSL::SSL::SSLSocket#accept may block indefinitely on clients which negotiate the TCP connection, but fail (or are slow) to negotiate the subsequent TLS handshake. This prevents the multi-threaded WEBrick server from accepting other connections. Since the TLS handshake (via OpenSSL::SSL::SSLSocket#accept) consists of normal read/write traffic over TCP, handle it in the per-client thread, instead. Furthermore, using non-blocking accept() is useful for non-TLS sockets anyways because spurious wakeups are possible from select(2). * lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock and remove OpenSSL::SSL::SSLSocket#accept call * lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#accept * test/webrick/test_ssl_server.rb (test_slow_connect): new test [ruby-core:83221] [Bug #14005] webrick: fix up r60172 By making the socket non-blocking in r60172, TLS/SSL negotiation via the SSL_accept function must handle non-blocking sockets properly and retry on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. OpenSSL::SSL::SSLSocket#accept cannot do that properly with a non-blocking socket, so it must use non-blocking logic of OpenSSL::SSL::SSLSocket#accept_nonblock. Thanks to MSP-Greg (Greg L) for finding this. * lib/webrick/server.rb (start_thread): use SSL_accept properly with non-blocking socket. [Bug #14013] [Bug #14005] webrick: fix up r60172 and revert r60189 Thanks to MSP-Greg (Greg L) for helping with this. * lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED, EPROTO, and EINVAL on TLS negotiation errors the same way they were ignored before r60172 in the accept_client method of the main acceptor thread. [Bug #14013] [Bug #14005] webrick: fix up r60172 and r60208 Thanks to MSP-Greg (Greg L) for helping with this. * lib/webrick/server.rb (start_thread): fix non-local return introduced in r60208 webrick: fix up r60172 and r60210 Thanks to MSP-Greg (Greg L) for helping with this. * lib/webrick/server.rb (start_thread): properly fix non-local return introduced in r60208 and r60210 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-14merge revision(s) 61197: [Backport #14184]nagachika
webrick: compile RE correctly for beginning and end match Using ^ and $ in regexps means we can accidentally get fooled by "%0a" in HTTP request paths being decoded to newline characters. Use \A and \z to match beginning and end-of-string respectively, instead. Thanks to mame and hsbt for reporting. * lib/webrick/httpserver.rb (MountTable#compile): use \A and \z instead of ^ and $ * lib/webrick/httpserver.rb (MountTable#normalize): use \z instead of $ * test/webrick/test_httpserver.rb (test_cntrl_in_path): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-03merge revision(s) 58499,58500: [Backport #13181]nagachika
parse.y: fix line in rescue * parse.y (set_line_body, primary): fix line number of bodystmt as the beginning of the block. [ruby-core:79388] [Bug #13181] parse.y: set_line_body is not used in ripper git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@60626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-11merge revision(s) 60149: [Backport #14003]nagachika
Merge rubygems-2.6.14 changes. It fixed http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@60168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14merge revision(s) 58254: [Backport #13402]nagachika
fix --with-gmp (broken by r57490) Looking at the generated shell script (also the autoconf manual), it seems AC_SEARCH_LIBS() m4 macro does not define HAVE_LIBsomething C preprocessor macros, unlike AC_CHECK_LIB() which does define them. This previous change effectively killed building with GMP because building that mode depends on existence of HAVE_LIBGMP. [Bug #13402] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14bump up teeny version to 2.4.3.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14merge revision(s) 59897:nagachika
lib/webrick/log.rb: sanitize any type of logs It had failed to sanitize some type of exception messages. Reported and patched by Yusuke Endoh (mame) at https://hackerone.com/reports/223363 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11merge revision(s) 59375: [Backport #13756]nagachika
parse.y: empty hash in defined * parse.y (command): NODE_ARRAY with NULL is invalid. traversal in defined_expr0 is simplified than iseq_compile_each0. [ruby-core:82113] [Bug #13756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59765: [Backport #13877]nagachika
ruby.h: unnormalized Fixnum value * include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug on mingw/mswin. [ruby-core:82687] [Bug #13877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59763: [Backport #13874]nagachika
string.c: fix false coderange * string.c (rb_enc_str_scrub): enc can differ from the actual encoding of the string, the cached coderange is useless then. [ruby-core:82674] [Bug #13874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59644: [Backport #13836]nagachika
parse.y: primary should not be 0 * parse.y (primary): should not be 0, since it can be a receiver. [ruby-core:82447] [Bug #13836] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59613: [Backport #13817]nagachika
vm_method.c: alias warning at refined method * vm_method.c (rb_method_entry_make): suppress a warning at refined method which will not be redefined. [ruby-core:82385] [Bug #13817] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10revert r59813 partially. TestGemRequire#test_realworld_default_gem is not ↵nagachika
contained in trunk. I would like to sync rubygems on ruby_2_4 branch to trunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59649: [Backport #13832]nagachika
gc.c: restore cfp at finalizer * gc.c (run_finalizer): restore cfp for the case an exception raised in a finalizer. [ruby-core:82432] [Bug #13832] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10revert r59815 partially.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10bump up RUBY_PATCHLEVELnagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10lib/rubygems: fix several vulnerabilities in RubyGems; bump to version 2.6.13.nagachika
[Backport #13842] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10lib/rubygems: bump up RubyGems version to 2.6.12. [Backport #13842]nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59708: [Backport #13844]nagachika
compile.c: ensure after toplevel return * compile.c (iseq_compile_each0): toplevel returns should fire ensures. [ruby-core:82492] [Bug #13844] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59624,59626: [Backport #13830]nagachika
ruby.h: fix rb_scan_args_trail_idx * include/ruby/ruby.h (rb_scan_args_trail_idx): fix the case both of optional and rest arguments are defined. [ruby-core:82427] [Bug #13830] * include/ruby/ruby.h (rb_scan_args_n_trail): ditto. non-keywords hash * class.c (rb_scan_args), include/ruby/ruby.h (rb_scan_args_set): return non-keywords elements only in the last hash when keyword arguments are extracted from it, as well as methods defined in ruby level. [ruby-core:82427] [Bug #13830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 59322,59325: [Backport #13744]nagachika
process.c: handle dynamic :rlimit_* symbols in spawn execopts * process.c (rb_execarg_addopt_rlimit): hoist out of rb_execarg_addopt (rlimit_type_by_sym): new wrapper for dynamic symbol (rb_execarg_addopt): check for dsym via rlimit_type_by_sym * test/ruby/test_process.rb (test_execopts_rlimit): check dsym w/o pindown Add extra check for bogus rlimit args, too. [ruby-core:82033] [Bug #13744] process.c: null bytes * process.c (rlimit_type_by_sym): prohibit null bytes in key names. [ruby-core:82033] [Bug #13744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 57944,57977,58062: [Backport #13306]nagachika
io.c: [DOC] IO#puts uses IO#write io.c: [DOC] add missing `$` io.c: [DOC] expand docs for IO#puts [ruby-core:80081] [Bug #13306] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-10merge revision(s) 58524,58525,58526,59333,59337: [Backport #13616]nagachika
zlib.c: zstream_expand_buffer_non_stream * ext/zlib/zlib.c (zstream_expand_buffer_non_stream): rename from zstream_expand_buffer_without_gvl() and replace duplicate code in zstream_expand_buffer(). zlib.c: zstream_buffer_ungetbyte * ext/zlib/zlib.c (zstream_buffer_ungetbyte): simplify by using zstream_buffer_ungets(). zlib.c: no buf_filled in zstream * ext/zlib/zlib.c (zstream): manage capacity and size of `buf` instead of size and separated member `buf_filled`. reported by Christian Jalio (jalio) at https://hackerone.com/reports/211958 Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start of file [Bug #13616] patched by Andrew Haines <[email protected]> [ruby-core:81488] zlib.c: fix unnormalized Fixnum * ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to result in an unsigned long to normalized to Fixnum on LLP64 platforms. [ruby-core:81488] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08merge revision(s) 59567: [Backport #13796]nagachika
openssl: import v2.0.5 Import Ruby/OpenSSL 2.0.5. The full commit history since v2.0.4 (imported at r59081) can be found at: https://github.com/ruby/openssl/compare/v2.0.4...v2.0.5 This will fix the test failure on latest Debian sid and the "no OPENSSL_Applink" issue on mswin. ---------------------------------------------------------------- Kazuki Yamaguchi (11): test/test_ssl: allow 3DES cipher suites in test_sslctx_set_params bio: prevent possible GC issue in ossl_obj2bio() bio: do not use the FILE BIO method in ossl_obj2bio() Rakefile: install_dependencies: install only when needed appveyor.yml: test against Ruby 2.4 ossl_pem_passwd_cb: relax passphrase length constraint ossl_pem_passwd_cb: do not check for taintedness ossl_pem_passwd_cb: handle nil from the block explicitly ssl: remove unsupported TLS versions from SSLContext::METHODS ssl: fix compile error with OpenSSL 1.0.0 Ruby/OpenSSL 2.0.5 Lars Kanis (1): Add msys2 library dependency tag in gem metadata git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08merge revision(s) 59693,59695: [Backport #13852]nagachika
A HTTP Header value must not contain CR or LF. to_str -> to_s * lib/net/http/header.rb (set_field): `val` can not have `to_str`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-08merge revision(s) 59584: [Backport #13850]nagachika
REXML: Fix a bug that unexpected methods can be called as a XPath function [HackerOne:249295] Reported by Andrea Jegher. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 59457: [Backport #13775]nagachika
should not copy promoted flags. * include/ruby/ruby.h (rb_clone_setup): should not copy some flags (FL_PROMOTED0|FL_PROMOTED1|FL_FINALIZE). [Bug #13775] * test/ruby/test_object.rb: add a test (note that this test will fail only when RGENGC_CHECK_MODE >= 2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 59368: [Backport #13753]nagachika
random.c: ensure initialized * random.c (get_rnd, try_get_rnd): ensure initialized to get rid of crash in forked processes. [ruby-core:82100] [Bug #13753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 59462,59474: [Backport #13772]nagachika
release VM stack properly. * cont.c: r55766 change the handling method of Fiber's VM stack. Resumed Fiber points NULL as VM stack and running Thread has responsibility to manage it (marking and releasing). However, thread_start_func_2()@thread.c and thread_free()@vm.c doesn't free the VM stack if corresponding root Fiber is exist. This causes memory leak. [Bug #13772] * cont.c (root_fiber_alloc): fib->cont.saved_thread.ec.stack should be NULL because running thread has responsibility to manage this stack. * vm.c (rb_thread_recycle_stack_release): assert given stack is not NULL (callers should care it). fix stack storing for root fibers. * cont.c (root_fiber_alloc): this function is called by fiber_current() and fiber_store(). fiber_current() should clear VM stack information in a fiber data because runnning thread knows stack information and has responsibility to manage it. However fiber_store() requires to remain VM stack information in a fiber data because the responsibility to manage VM stack is moved to the Fiber from the Thread (and switch to another fiber). * cont.c (root_fiber_alloc): save thread's fiber and root_fiber information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 59128: [Backport #13669]nagachika
Fix Enumerable#uniq with non single yield arguments * enum.c (uniq_func, uniq_iter): need packed value as the unique key. [ruby-core:81734] [Bug #13669] [Fix GH-1658] Author: Kenichi Kamiya <[email protected]> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 58810,58894: [Backport #13578]nagachika
compile.c: fix catch-table labels optimization * compile.c (remove_unreachable_chunk): do not eliminate chunks followed by labels in catch-table entries. compile.c: fix possible use of uninitialized value LABEL::unremovable added by r58810 is not initialized by new_label_body(), making the optimization unstable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 58561: [Backport #13540]nagachika
parse.y: make shared string modifiable * parse.y (dedent_string): ensure that the string is modifiable, not to set the length of shared string. [ruby-core:80987] [Bug #13540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-05merge revision(s) 58205: [Backport #13380]nagachika
Remove unused Init_frozen_strings declaration Init_frozen_strings definition is removed in r51511. https://bugs.ruby-lang.org/issues/11423 Patch by Kohei Suzuki <[email protected]> * internal.h: Remove declaration of unexist function [Fix GH-1558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e