summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-01add tag v2_6_5v2_6_5nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_6_5@67812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-10-01lib/shell/command-processor.rb (Shell#[]): prevent unknown commandnagachika
`FileTest.send(command, ...)` allows to call not only FileTest-related methods but also any method that belongs to Kernel, Object, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-10-01merge revision(s) 3ce238b5f9795581eb84114dcfbdf4aa086bfecc:nagachika
WEBrick: prevent response splitting and header injection This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16. The commit prevented CRLR, but did not address an isolated CR or an isolated LF. Co-Authored-By: NARUSE, Yui <naruse@airemix.jp> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-10-01merge revision(s) 36e057e26ef2104bc2349799d6c52d22bb1c7d03:nagachika
Loop with String#scan without creating substrings Create the substrings necessary parts only, instead of cutting the rest of the buffer. Also removed a useless, probable typo, regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-10-01merge revision(s) a0a2640b398cffd351f87d3f6243103add66575b:nagachika
Fix for wrong fnmatch patttern * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-09-28merge revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac: [Backport #15935]nagachika
Fix memory leak * string.c (str_make_independent_expand): free independent buffer. [Bug# 15935] Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-09-27merge revision(s) 93faa011d393bb4b5cf31a0cbb46922f0a5e7cdc: [Backport #16151]nagachika
Tag string shared roots to fix use-after-free The buffer deduplication codepath in rb_fstring can be used to free the buffer of shared string roots, which leads to use-after-free. Introudce a new flag to tag strings that at one point have been a shared root. Check for it in rb_fstring to avoid freeing buffers that are shared by multiple strings. This change is based on nobu's idea in [ruby-core:94838]. The included test case test for the sequence of calls to internal functions that lead to this bug. See attached ticket for Ruby level repros. [Bug #16151] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-09-14merge revision(s) ade1283ca276f7d589ffd3539fbc7b9817f682d5: [Backport #16136]nagachika
Fix a use-after-free bug by avoiding rb_str_new_frozen `str2 = rb_str_new_frozen(str1)` seems to make str1 a shared string that refers to str2, but str2 is not marked as STR_IS_SHARED_M nor STR_NOFREE. `rb_fstring(str2)` frees str2's ptr because it is not marked, and the free'ed pointer is the same as str1's ptr. After that, accessing str1 may cause use-after-free memory corruption. I guess this is a bug of rb_str_new_frozen, but I'm completely unsure what it should be; the string states and flags are not documented. So, this is a workaround for [Bug #16136]. I confirmed that rspec of activeadmin runs gracefully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-09-13merge revision(s) 547887138f19959f649b1c0dbcde5659ae3878ed:nagachika
test/ruby/test_fiber.rb: reduce the count of object creation to cause GC The test consistently fails on OpenBSD. https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20190903T010009Z.fail.html.gz ``` 1) Failure: TestFiber#test_fork_from_fiber [/home/chkbuild/chkbuild/tmp/build/20190903T010009Z/ruby/test/ruby/test_fiber.rb:327]: [ruby-core:41456]. <0> expected but was <1>. ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-09-13merge revision(s) b0b0ded5aa2cf7c4574b057d8326ed4e1c172c12:nagachika
webrick/test_utils.rb: loosen timeout severity to stabilize CI failure like: https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1013/ruby-trunk/log/20181228T114501Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-29bump up teeny version to 2.6.5.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-28merge revision(s) ↵nagachika
f308ab2131ee675000926540cbb8c13c91dc3be5,989e8ad322afdfa3aa06e74b89fc42aef42895d0: Remove jquery.js Remove debug print [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-28merge revision(s) 4e038a7e64a9d52eed59b8f05647d4e58d265ec3: [Backport #5400]nagachika
Revert "parse.y: Deprecate flip-flops" This reverts commit bae638ad5b782c44c80efe33834cb9039279af46. [Feature #5400] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-27bump up teeny version to 2.6.4.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-27Update rdoc version from 6.1.0 to 6.1.2.nagachika
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-22merge revision(s) fd0e3bd2497d4e796b719c7b7154dc3c945f87b1: [Backport #14834]nagachika
fix VC 2013 compile error It seems the compiler does not support VLAs. See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-22merge revision(s) 9557069299ac3b96691040a541afa65761a724ad: [Backport #15992]nagachika
Avoid creating Hash objects per each mon_synchronize call (#2393) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-18merge revision(s) d5c33364e3c0efb15e11df417c925afee2cdb9c9: [Backport #16105]nagachika
Fixed heap-use-after-free * string.c (rb_str_sub_bang): retrieves a pointer to the replacement string buffer just before using it, for the case of replacement with the receiver string itself. [Bug #16105] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-18merge revision(s) 5b1bf8dd2d08ae7371ecf025967376bb794ed651: [Backport #16099]nagachika
UTF LE is fixed at least the first 2 bytes * io.c (io_strip_bom): if the first 2 bytes are 0xFF0xFE, it should be a little-endian UTF, 16 or 32. [Bug #16099] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-18merge revision(s) ↵nagachika
5d33f787169bcc3594d2264726695d58c4a06899,8b162ce9d1003e4e469d8f48cb9a2076fd45b47c: [Backport #14834] fix tracepoint + backtrace SEGV PC modification in gc_event_hook_body was careless. There are (so to say) abnormal iseqs stored in the cfp. We have to check sanity before we touch the PC. This has not been fixed because there was no way to (ab)use the setup from pure-Ruby. However by using our official C APIs it is possible to touch such frame(s), resulting in SEGV. Fixes [Bug #14834]. Fix assertion failure when VM_CHECK_MODE Some VM frames (dummy and top pushed by `rb_vm_call_cfunc`) has iseq but has no pc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-18merge revision(s) df317151a5b4e0c5a30fcc321a9dc6abad63f7ed: [Backport #16019]nagachika
should not free local hook_list here. exec_hooks_postcheck() clean executed hook_list if it is needed. list_exec is freed if there are no events and this list is local event (connected to specific iseq). However, iseq keeps to point this local hook_list, freed list. To prevent this situation, do not free hook_list here even if it has no events. This issue is reported by @joker1007. https://twitter.com/joker1007/status/1153649170797830144 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-18merge revision(s) ↵nagachika
f1b76ea63ce40670071a857f408a4747c571f1e9,1d1f98d49c9908f4e3928e582d31fd2e9f252f92: [Backport #16024] Occupy match data * string.c (rb_str_split_m): occupy match data not to be modified during yielding the block. [Bug #16024] Reuse match data * string.c (rb_str_split_m): reuse occupied match data. [Bug #16024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-18merge revision(s) f91879a7b548284c93743168acfd11e3d2aeefac: [Backport #15992]nagachika
handle_interrupt to defend monitor state [Bug #15992] If an exception is raised from another thread for example Timeout and this thread is just after `mon_exit`'s `@mon_owner = nil`, the exception breaks the state of MonitorMixin. To prevent that situation, it need to block interruption in mon_enter and mon_exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-11merge revision(s) ↵nagachika
8aecc90974ab1ac87056f77e2cb3406c5c041504,2f6cc15cdb3d64135b29cfd5ee376a5a03ebbee7: [Backport #15965] Hoisted out WIDE_ENCODINGS Fixed String#grapheme_clusters with wide encodings * string.c (get_reg_grapheme_cluster): make regexp from properly encoded sources fro wide-char encodings. [Bug #15965] * regparse.c (node_extended_grapheme_cluster): suppress false duplicated range warning for the time being. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-09merge revision(s) ↵nagachika
ec8e5f5aa64e2a54cf1e303f2b012c98e8d521ba,5a187e26adc8aa32367f294c1496935c7356d386: [Backport #15952] array.c: always check frozenness in Array#unshift. Fixes [Bug #15952] Closes: https://github.com/ruby/ruby/pull/2251 array.c add back shared array optimization to ary_ensure_room_for_unshift Bug fix in commit ec8e5f5aa64e2a [Bug #15952] disabled an optimization in this function. Closes: https://github.com/ruby/ruby/pull/2252 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-09merge revision(s) 8f51da5d41f0642d5a971e4223d1ba14643c6398: [Backport #15946]nagachika
Get rid of undefined behavior * string.c (rb_str_sub_bang): str and repl can be same. [Bug #15946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-09merge revision(s) ↵nagachika
28678997e40869f5591eae60edd9757334426ffb,8797f48373dcfa3ff8e748667732dea8aea4347e: [Backport #15937] Preserve the string content at self-copying * string.c (rb_str_init): preserve the embedded content when self-copying with a capacity. [Bug #15937] New buffer for shared string * string.c (rb_str_init): allocate new buffer if the string is shared. [Bug #15937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) ↵nagachika
ae2a904ce9bffedee7d110dc60fd51c0a2879a5b,165ddfda20f6db8a3149d14c4f431fc242ddab70,fa7a768fdfe5223a29db4fa71b3e6101fb02ad51: [Backport #16051] Update the certificate files to make the test pass on Debian 10 The old certificate files (for example, test/rubygems/ca_cert.pem) were signed by SHA1. This message digest is considered too weak and rejected by OpenSSL 1.1.1 or later. Because of this, the test suite does not pass on Debian 10. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T123003Z.fail.html.gz#test%2Frubygems This change regenerates the files. A shell script for the regeneration (util/create_certs.sh) is also added. * remove trailing spaces. Removed inconsistency file from upstream repository of rubygems. followed up ae2a904ce9bffedee7d110dc60fd51c0a2879a5b git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) ↵nagachika
5931857281ce45c1c277aa86d1588119ab00a955,76e2370f132f83c16c9de39a0a9356579f364527: [Backport #16041] Fix dangling path name from fstring * parse.y (yycompile): make sure in advance that the `__FILE__` object shares a fstring, to get rid of dangling path name. Fixed up 53e9908d8afc7f03109b0aafd1698ab35f512b05. [Bug #16041] * vm_eval.c (eval_make_iseq): ditto. Fix dangling path name from fstring * load.c (rb_require_internal): make sure in advance that the path to be loaded shares a fstring, to get rid of dangling path name. Fixed up 5931857281ce45c1c277aa86d1588119ab00a955. [Bug #16041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) 1e54903684aa3c9ea3fe54520157846a1b1f07be: [Backport #16051]nagachika
test/openssl: Support OpenSSL 1.1.1 OpenSSL 1.1.1 rejects some shorter keys, which caused some failures of `make test-all TESTS=openssl`. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190606T003005Z.fail.html.gz This change merges 6bbc31ddd1 and 63fb3a36d1 in https://github.com/ruby/openssl. Reference: https://github.com/ruby/openssl/pull/217 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) 43730256e800dd8e0c5cc482e9861868590ae037:nagachika
open-uri: Regenerate server certificates for tests OpenSSL 1.1.1 requires 2048 bits or more. This change will fix: https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190527T003004Z.fail.html.gz#test%2Fopen-uri git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) 9dec4e8fc3a6018261834b5ac9b9877f787b97ca: [Backport #15934]nagachika
String#b: Don't depend on dependent string Registering a string that depend on a dependent string as fstring can lead to use-after-free. See c06ddfe and 3f95620 for details. The following script triggers use-after-free on trunk, 2.4.6, 2.5.5 and 2.6.3. Credits to @wanabe for using eval as a cross-version way of registering a fstring. ```ruby a = ('j' * 24).b.b eval('', binding, a) p a 4.times { GC.start } p a ``` - string.c (str_replace_shared_without_enc): when given a dependent string, depend on the root of the dependent string. [Bug #15934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) 53e9908d8afc7f03109b0aafd1698ab35f512b05: [Backport #15916]nagachika
Fix memory leak * string.c (str_replace_shared_without_enc): free previous buffer before replaced. * parse.y (gettable): make sure in advance that the `__FILE__` object shares a fstring, to get rid of replacement with the fstring later. TODO: this hack may be needed in other places. [Bug #15916] Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07merge revision(s) ↵nagachika
3f9562015e651735bfc2fdd14e8f6963b673e22a,c06ddfee878524168e4af07443217ed2f8d0954b,3b3b4a44e57dfe03ce3913009d69a33d6f6100be: [Backport #15792] Get rid of indirect sharing * string.c (str_duplicate): share the root shared string if the original string is already sharing, so that all shared strings refer the root shared string directly. indirect sharing can cause a dangling pointer. [Bug #15792] str_duplicate: Don't share with a frozen shared string This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a. Before this commit, it was possible to create a shared string which shares with another shared string by passing a frozen shared string to `str_duplicate`. Such string looks like: ``` -------- ----------------- | root | ------ owns -----> | root's buffer | -------- ----------------- ^ ^ ^ ----------- | | | shared1 | ------ references ----- | ----------- | ^ | ----------- | | shared2 | ------ references --------- ----------- ``` This is bad news because `rb_fstring(shared2)` can make `shared1` independent, which severs the reference from `shared1` to `root`: ```c /* from fstr_update_callback() */ str = str_new_frozen(rb_cString, shared2); /* can return shared1 */ if (STR_SHARED_P(str)) { /* shared1 is also a shared string */ str_make_independent(str); /* no frozen check */ } ``` If `shared1` was the only reference to `root`, then `root` can be reclaimed by the GC, leaving `shared2` in a corrupted state: ``` ----------- -------------------- | shared1 | -------- owns --------> | shared1's buffer | ----------- -------------------- ^ | ----------- ------------------------- | shared2 | ------ references ----> | root's buffer (freed) | ----------- ------------------------- ``` Here is a reproduction script for the situation this commit fixes. ```ruby a = ('a' * 24).strip.freeze.strip -a p a 4.times { GC.start } p a ``` - string.c (str_duplicate): always share with the root string when the original is a shared string. - test_rb_str_dup.rb: specifically test `rb_str_dup` to make sure it does not try to share with a shared string. [Bug #15792] Closes: https://github.com/ruby/ruby/pull/2159 Update dependencies git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-07Update Xcode or Homebrew (apply ↵nagachika
https://github.com/nobu/ruby/commit/c86b74dc431d4cbdeb7d3c3fe5ac0693dc731bb1) [Bug #16032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-05merge revision(s) 5e018214e7435030727a97ac49db038d96438e74: [Backport #15720]nagachika
Fix SystemStackError when calling a method in an unused refinement Fixes [Bug #15720] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-05merge revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf: [Backport #15360]nagachika
do_mutex_lock: release mutex before checking for interrupts (fixes issue 15360) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-05merge revision(s) 2403f9ac3af170ce0107a709a9cb510fe0501648:nagachika
Expand the timeout of `test_pstore_files_are_accessed_as_binary_files` Sometimes causes timeout error on mswin CI git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-04merge revision(s) 66977: [Backport #15578]nagachika
Revert r63383, r63248 "compile.c: copy a short insn with leave" When copying `leave` insn, TRACE also should be copied if it is present, but this optimization is trivial and not worth the complexity. [ruby-core:91366] [Bug #15578] 4cae5353c03009beb1e0a1619422072773580609 5afd479de63b6609ddcd1510da94d2c1ac384f7f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-03merge revision(s) 1ef39d8d099f145222b9352423af16a2bab6e05b: [Backport #15798]nagachika
Fix process not waking up on signals on OpenBSD When using UBF_TIMER_PTHREAD (the UBF handler on OpenBSD), the timer_pthread_fn function will not signal the main thread with SIGVTALRM in cases where timer_pthread is armed before consume_communication_pipe is called. This is because consume_communication_pipe will unarm the timer. Fix this by checking the return value of consume_communication_pipe. If it returns TRUE and the timer_pthread is disarmed, then signal the main thread with SIGVTALRM. On OpenBSD, this fixes TestThread#test_thread_timer_and_interrupt, and fixes hangs in TestProcess#test_execopts_redirect_open_fifo_interrupt_raise and TestProcess#test_execopts_redirect_open_fifo_interrupt_print. It also fixes the use of Ctrl+C/SIGINT in irb on OpenBSD. It does not cause any test failures on Linux when UBF_TIMER_PTHREAD is forced as the UBF handler. Fixes [Bug #15798] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-01merge revision(s) ↵nagachika
6375c68f8851e1e0fee8a95afba91c4555097127,c05eaa93258ddc01e685b6cc3a0da82998a2af48: [Backport #15839] parse.y: function parser_mixed_error & parser_mixed_escape git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Fix mixed encoding in heredoc Heredocs are parsed line-by-line, so we need to keep track of the temporary encoding of the string. Previously, a heredoc would only detect mixed encoding errors if they were on the same line, this changes things so they will be caught on different lines. Fixes [Bug #15839] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-08-01merge revision(s) 5bab1304af25a843728dbcd2f3594913740aecb0: [Backport #15847]nagachika
fix visibility of SecureRandom.gen_random Aliasing a method preserves its visibility. These aliases turn formerly-public methods into private. Should make them public again. [Bug #15847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-31merge revision(s) ea42423908ed055f9039b1dce6e9a232a3b2dd90: [Backport #15887]nagachika
Keep vm->orig_progname alive `vm->orig_progname` can be different from `vm->progname` when user code assigns to `$0`. While `vm->progname` is kept alive by the global table, nothing marked `vm->orig_progname`. [Bug #15887] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-31merge revision(s) ↵nagachika
b165bedcbd41d791a85fc1ce90b57a0d0525f319,ac00bdc8a8ac2c62a94dd36a7784d15bbcb7df19: [Backport #15821] skip a test to pass CIs. I'm debugging [Bug #15821] but my patch introduces another issue. So I simply skip this test and re-enable it later. Do not modify shared array [Bug #15821] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-31merge revision(s) 374c8f4ebab1a740990330c732b9de965c5e8d10: [Backport #15823]nagachika
Fixed about ARGF.lineno [Bug #15823] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-31merge revision(s) ↵nagachika
d0ba4abf1a00339ebbb5d405db3240a8bdb7b68b,54eac83b2ad77ddea84fa6d66c09e0bb014cf61e: [Backport #15786] Add RB_ID_SERIAL_MAX Hide internal IDs * parse.y (internal_id): number the ID serial for internal use by counting down from the neary maximum value, not to accidentally match permanent IDs. [Bug #15768] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-28merge revision(s) a6a26e42b15c46f117f4fce07a2050e9d727355d: [Backport #15906]nagachika
compile.c: Partially revert r63870 which caused wrong optimization [Bug #15906] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-28merge revision(s) dcb6a6ae3e2b8a3e298e7f0d4a3e7f8ff102a30e: [Backport #15845]nagachika
Windows simply causes an error to open invalid path git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-25merge revision(s) b72623012d74abdb06210153ed48c9e2fa075bbd: [Backport #15775]nagachika
Update broken URL in Float documentation. [Misc #15775][ruby-core:92332] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-07-25merge revision(s) a15f7dd1fb1148c3d586238ee6907875f2e40379: [Backport #15803]nagachika
Always mark the string returned by File.realpath as tainted This string can include elements that were not in either string passed to File.realpath, even if one of the strings is an absolute path, due to symlinks: ```ruby Dir.mkdir('b') unless File.directory?('b') File.write('b/a', '') unless File.file?('b/a') File.symlink('b', 'c') unless File.symlink?('c') path = File.realpath('c/a'.untaint, Dir.pwd.untaint) path # "/home/testr/ruby/b/a" path.tainted? # should be true, as 'b' comes from file system ``` [Bug #15803] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e