53979 Commits

Author SHA1 Message Date
usa
69f9992ed4 Fix dtoa buffer overrun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2022-04-12 11:49:45 +00:00
usa
fa7f75ddda Backport date-2.0.3 for Reiwa Support [Backport #18514]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2022-04-12 11:03:11 +00:00
usa
560a4cdf04 fix for #16798 to Ruby 2.6 introduced C99 syntax [Backport #18387]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2022-04-12 10:52:41 +00:00
usa
02c341c9bc When parsing cookies, only decode the values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-11-24 11:41:55 +00:00
usa
1fbf663b00 Merge date-2.0.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-11-24 09:07:47 +00:00
usa
95ba9053e2 Fix StartTLS stripping vulnerability
Reported by Alexandr Savca in https://hackerone.com/reports/1178562

Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-07-07 10:38:10 +00:00
usa
be5a83e84a Ignore IP addresses in PASV responses by default, and add new option use_pasv_ip
This fixes CVE-2021-31810.
Reported by Alexandr Savca.

Co-authored-by: Shugo Maeda <shugo@ruby-lang.org>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-07-07 10:34:08 +00:00
usa
9fd60e03aa patchlevel for previous commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-07-03 17:10:56 +00:00
usa
fe3c49c9ba merge revision(s) b1c73f23,c9ab8fe2: [Backport #17877]
[ruby/rdoc] Use File.open to fix the OS Command Injection vulnerability in CVE-2021-31799
	
	https://github.com/ruby/rdoc/commit/a7f5d6ab88

	The test for command injection on Unix platforms should be omitted on Windows


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-07-03 17:10:28 +00:00
usa
83c255e89f merge revision(s) 9edc1625: [Backport #17781]
[ruby/resolv] Fix confusion of received response message

	This is a follow up for commit 33fb966197f1 ("Remove sender/message_id
	pair after response received in resolv", 2020-09-11).

	As the @senders instance variable is also used for tracking transaction
	ID allocation, simply removing an entry without releasing the ID would
	eventually deplete the ID space and cause
	Resolv::DNS.allocate_request_id to hang.

	It seems the intention of the code was to check that the received DNS
	message is actually the response for the question made within the method
	earlier. Let's have it actually do so.

	[Bug #12838] https://bugs.ruby-lang.org/issues/12838
	[Bug #17748] https://bugs.ruby-lang.org/issues/17748

	https://github.com/ruby/resolv/commit/53ca9c9209
	---
	 lib/resolv.rb | 6 +++---
	 1 file changed, 3 insertions(+), 3 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-07-03 16:56:34 +00:00
usa
67b324529b merge revision(s) d8a13e50: [Backport #17780]
[Bug #17780] Fix Method#super_method for module alias

	Method#super_method crashes for aliased module methods because they are
	not defined on a class. This bug was introduced in
	c60aaed1856b2b6f90de0992c34771830019e021 as part of bug #17130.
	---
	 proc.c                   |  2 +-
	 test/ruby/test_method.rb | 13 +++++++++++++
	 2 files changed, 14 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-07-03 16:53:29 +00:00
usa
263f966244 merge revision(s) 17aeff3e77e6fe0d37a9943dd93bcb16c4bb9f66,1616dcb16ef34ebf4ffc2167292f9a779f3e121e,1616dcb16ef34ebf4ffc2167292f9a779f3e121e:
make-snapshot: get rid of circular dependency

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 5 ++---
	 1 file changed, 2 insertions(+), 3 deletions(-)

	make-snapshot: try downloading Unicode files

	[Bug #15593]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 7 +------
	 1 file changed, 1 insertion(+), 6 deletions(-)

	make-snapshot: try downloading Unicode files

	[Bug #15593]

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 tool/make-snapshot | 7 +------
	 1 file changed, 1 insertion(+), 6 deletions(-)

	these patches are not for security issue, but are needed to resolv a
	packaging problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-06-23 15:47:43 +00:00
usa
72ad9d27aa fix previous commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-05-10 03:24:37 +00:00
usa
5df653caaa fix macos build
note that this is not a security fix, but recognized as critical build problem.
[Backport #17777]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-05-09 16:11:52 +00:00
usa
1b59a4dc76 REXML 3.1.9.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 11:48:23 +00:00
usa
1a38986aed merge revision(s) 254bed302752a401b5fcc3b6c65a9c93711d91d6,fad3023e94c45e7f03478732f7641b6f39ba9d12,3156fb0f2c3ebf8229f392c8502c08fe165ab181: [Backport #17218]
Renamed `nurat_sub` compliant with `rb_rational_plus`


	Fix ArithmeticSequence#last and ArithmeticSequence#each for
	non-integer sequences (#3870)

	[Bug #17218]
	[ruby-core:100312]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 01:22:11 +00:00
usa
a5272e6431 merge revision(s) ebb96fa8808317ad53a4977bff26cf755d68077e: [Backport #17321]
Fix singleton class cloning

	Before this commit, `clone` gave different results depending on whether the original object
	had an attached singleton class or not.

	Consider the following setup:
	```
	class Foo; end
	Foo.singleton_class.define_method(:foo) {}

	obj = Foo.new

	obj.singleton_class if $call_singleton

	clone = obj.clone
	```

	When `$call_singleton = false`, neither `obj.singleton_class.singleton_class` nor
	`clone.singleton_class.singleton_class` own any methods.

	However, when `$call_singleton = true`, `clone.singleton_class.singleton_class` would own a copy of
	`foo` from `Foo.singleton_class`, even though `obj.singleton_class.singleton_class` does not.

	The latter case is unexpected and results in a visibly different clone, depending on if the original object
	had an attached class or not.

	Co-authored-by: Ufuk Kayserilioglu <ufuk.kayserilioglu@shopify.com>
	---
	 class.c                 | 31 ++++++++++++++++++++++---------
	 test/ruby/test_class.rb | 47 +++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 69 insertions(+), 9 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 00:19:04 +00:00
usa
082b0acffb merge revision(s) 276f6a225d18561cbe5282b798cb4e416c66079f,95bef7b69a6fb42687a6200b338060be307259f5: [Backport #17352]
Don't double fractional seconds when passing timezone object to Time.new

	I found that fractional seconds were doubled when using the timezone
	feature of Time in Sequel's named_timezones extension (which uses
	TZInfo for the timezone object), and traced the problem to this code.

	There is no subsecx being modified in the utc_to_local call below
	this, and I'm not sure why you would want to add in the fractional
	seconds unless you assumed the timezone conversion would drop the
	existing fractional seconds (TZInfo doesn't drop fractional seconds).


	Subsecond of Time::tm should be 0


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 00:17:28 +00:00
usa
04601ea6c8 merge revision(s) c60aaed1856b2b6f90de0992c34771830019e021: [Backport #17130]
Fix Method#super_method for aliased methods

	Previously, Method#super_method looked at the called_id to
	determine the method id to use, but that isn't correct for
	aliased methods, because the super target depends on the
	original method id, not the called_id.

	Additionally, aliases can reference methods defined in other
	classes and modules, and super lookup needs to start in the
	super of the defined class in such cases.

	This adds tests for Method#super_method for both types of
	aliases, one that uses VM_METHOD_TYPE_ALIAS and another that
	does not. Both check that the results for calling super
	methods return the expected values.

	To find the defined class for alias methods, add an rb_ prefix
	to find_defined_class_by_owner in vm_insnhelper.c and make it
	non-static, so that it can be called from method_super_method
	in proc.c.

	This bug was original discovered while researching [Bug #11189].

	Fixes [Bug #17130]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 00:12:27 +00:00
usa
1c7f2cceac merge revision(s) abe2e7de4d1f2d5861d7c9ab9c7e778f2ee1dcd2: [Backport #16774]
Don't require sub-word atomics

	On some architectures (like RISC-V) sub-word atomics are only available
	when linking against -latomic, but the configure script doesn't do that,
	causing the atomic checks to fail and the resulting ruby binary is
	non-functional.  Ruby does not use sub-word atomic operations, rb_atomic_t
	is defined to unsigned int, so use unsigned int when checking for atomic
	operations.
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 00:05:42 +00:00
usa
209d0f0e6d merge revision(s) c15cddd1d515c5bd8dfe8fb2725e3f723aec63b8: [Backport #16787]
Allow Dir.home to work for non-login procs when $HOME not set

	Allow the 'Dir.home' method to reliably locate the user's home directory when
	all three of the following are true at the same time:

	1. Ruby is running on a Unix-like OS
	2. The $HOME environment variable is not set
	3. The process is not a descendant of login(1) (or a work-alike)

	The prior behavior was that the lookup could only work for login-descended
	processes.

	This is accomplished by looking up the user's record in the password database
	by uid (getpwuid_r(3)) as a fallback to the lookup by name (getpwname_r(3))
	which is still attempted first (based on the name, if any, returned by
	getlogin_r(3)).

	If getlogin_r(3), getpwnam_r(3), and/or getpwuid_r(3) is not available at
	compile time, will fallback on using their respective non-*_r() variants:
	getlogin(3), getpwnam(3), and/or getpwuid(3).

	The rationale for attempting to do the lookup by name prior to doing it by uid
	is to accommodate the possibility of multiple login names (each with its own
	record in the password database, so each with a potentially different home
	directory) being mapped to the same uid (as is explicitly allowed for by
	POSIX; see getlogin(3posix)).

	Preserves the existing behavior for login-descended processes, and adds the
	new capability of having Dir.home being able to find the user's home directory
	for non-login-descended processes.

	Fixes [Bug #16787]

	Related discussion:
	https://bugs.ruby-lang.org/issues/16787
	https://github.com/ruby/ruby/pull/3034


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-05 00:04:41 +00:00
usa
5f83e778cc merge revision(s) 2a83650b0fd25719fb6c03bfec7bd895734d3ceb: [Backport #15852]
Destroy VM-wise locks before freeing [Bug #15852]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:50:56 +00:00
usa
bde8e4e6f8 merge revision(s) 9682db065158da5fa4ec8a3bc267da45b429b92c: [Backport #17658]
Remove sender/message_id pair after response received in resolv

	Once a response for a given DNS request has been received (which
	requires a matching message id), the [sender, message_id] pair
	should be removed from the list of valid senders.  This makes it
	so duplicate responses from the same sender are ignored.

	Fixes [Bug #12838]
	---
	 lib/resolv.rb           |   2 +-
	 test/resolv/test_dns.rb | 113 ++++++++++++++++++++++++++++++++++++++++++++++++
	 2 files changed, 114 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:47:58 +00:00
usa
5572ae0f28 merge revision(s) f4be7a510eebbe6507ba41d138d7d252f4a68e90,9441f3f97087a4325ee80911859d37da41fa5050: [Backport #17504]
Added tests for Time#getlocal with UTC offset

	---
	 test/ruby/test_time.rb | 8 ++++++++
	 1 file changed, 8 insertions(+)

	Allow UTC offset without colons per ISO-8601 [Bug #17504]

	---
	 test/ruby/test_time.rb |  6 ++++++
	 time.c                 | 44 +++++++++++++++++++++++++++++---------------
	 2 files changed, 35 insertions(+), 15 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:45:25 +00:00
usa
fd734d4992 merge revision(s) 0036648a420f945624898568bb82bc5f83195d12: [Backport #17533]
Capture to reserved name variables if already defined [Bug #17533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:43:53 +00:00
usa
8890779077 merge revision(s) a55eb9a2af7950d180d9d31ffde2bce66710f44f: [Backport #17572]
Make reciprocal properly of non-integral rational [Bug #17572]

	---
	 rational.c                 | 2 +-
	 test/ruby/test_rational.rb | 7 +++++++
	 2 files changed, 8 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:40:30 +00:00
usa
8bfee86135 merge revision(s) ce7a053475cbebfb2f3e5ed6614e0ba631541917,1cbb1f1720127b0b34b38c77e27b51b182008699: [Backport #16695]
Adjust sp for `x = false; y = (return until x unless x)` [Bug #16695]

    test/ruby/test_syntax.rb: avoid "warning: assigned but unused
     variable"


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:36:51 +00:00
usa
c08edc4eef merge revision(s) 8b0dc77a621ded75f72486c33f55404ce73f00d7: [Backport #17275]
configure.ac: Bump the size of sigaltstack

	The RubyVM uses C macro defines to feature detect whether
	`backtrace(2)` support is available, and if so it includes C level backtraces
	when the RubyVM itself crashes.

	But on my machine, C level backtraces from `vm_dump.c` didn't work when
	using a version of Ruby buillt on the machine, but worked fine when using a
	version of Ruby built on another machine and copied to my machine.

	The default autoconf test for backtraces uses a sigaltstack size that is
	too small, so the SIGSEGV signal handler itself causes a SIGSEGV).
	I noticed that signal.c uses a larger sigaltstack size:

	https://github.com/ruby/ruby/blob/v2_6_5/signal.c#L568

	The specific variables it looks at:

	- `HAVE_BACKTRACE`

	  this is a macro defined by autoconf because there is a line in the
	  configure script like `AC_CHECK_FUNCS(backtrace)` (see the autoconf
	  docs for more).

	- `BROKEN_BACKTRACE`

	  this comes from a custom program that Ruby's configure script runs to
	  attempt to figure out whether actually using backtrace(2) in a real
	  program works. You can see the autoconf program here.

	  <https://github.com/ruby/ruby/blob/v2_6_5/configure.ac#L2817-L2863>

	It uses sigaltstack and SA_ONSTACK to create a seperate stack for
	handling signals.

	The problem was: SIGSTKSZ (which comes from a system header!) was not
	suggesting a large enough stack size. When checking on an Ubuntu 16.04
	box, we found that SIGSTKSZ was 8192 and MINSIGSTKSZ was 2048.
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:31:49 +00:00
usa
245a5e5285 merge revision(s) be9dbe1c3eb4bb4cab0bdc42a91ef425bb1eaddd: [Backport #15178]
Fix pthread_setname_np arguments on NetBSD

	The previous attempt to fix this in
	b87df1bf243074edb2e6cc8a24bc00df81cebf3c reversed the argument
	order instead of just fixing the quote escaping.

	From Takahiro Kambe.

	Fixes [Bug #15178]
	---
	 configure.ac | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:30:49 +00:00
usa
56f6c15dab backported a part of a569bc09e25a2ba813d0bec1228d9ff65330a3db
picked up by Jeremy Evans [Backport #17305]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:28:16 +00:00
usa
6638b504b1 merge revision(s) 8e189df32cacef4b21e357a590d349330532baf5: [Backport #17013]
Add operator info to OP_ASGN2 of RubyVM::AbstractSyntaxTree.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:07:45 +00:00
usa
942129cdba merge revision(s) de9d6a7a8cb0929e0b4cf0a3120971c7b8ee8927,da5bd0047d6c961105da210c69d4c88421324b70,ce91c5615ca96f357519043181fb5b76b57ee223,c53aebb1d2eb5afbb18f9b3db9f9c956a463a4e1,d05f04d27dd86c67e4a8dfff4392f806cf577bdf: [Backport #16931]
Split test_defined

	---
	 test/ruby/test_defined.rb | 18 ++++++++++++++++--
	 1 file changed, 16 insertions(+), 2 deletions(-)

	Test for [Bug #16669]

	---
	 test/ruby/test_defined.rb | 8 ++++++++
	 1 file changed, 8 insertions(+)

	Fix typo in test name

	---
	 test/ruby/test_defined.rb | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	Split test_defined_method

	---
	 test/ruby/test_defined.rb | 23 ++++++++++++++++++++++-
	 1 file changed, 22 insertions(+), 1 deletion(-)

	Fixed `defined?` against protected method call

	Protected methods are restricted to be called according to the
	class/module in where it is defined, not the actual receiver's
	class.  [Bug #16931]
	---
	 test/ruby/test_defined.rb | 1 +
	 vm_insnhelper.c           | 2 +-
	 2 files changed, 2 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 23:03:14 +00:00
usa
1bce19a7e5 merge revision(s) a0bc3f2a1c2c98f225612101cb4e1ea1a6813546,75a0447c15a7ab017bd4240c2a9cc69b134b80b9,f1699314147bad2cf5550cc582693424fdbc2510: [Backport #16846]
Suppress C4267 "possible loss of data" warnings

	---
	 ext/win32ole/win32ole.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	Suppress C4267 "possible loss of data" warnings

	Just cast down explicitly.
	---
	 ext/win32ole/win32ole.c | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	win32ole: separate global variable declarations and definitions

	https://gcc.gnu.org/gcc-10/changes.html#c

	> * GCC now defaults to `-fno-common`.  As a result, global
	>   variable accesses are more efficient on various targets.  In
	>   C, global variables with multiple tentative definitions now
	>   result in linker errors.  With `-fcommon` such definitions are
	>   silently merged during linking.
	---
	 ext/win32ole/win32ole.c           | 1 +
	 ext/win32ole/win32ole.h           | 4 ++--
	 ext/win32ole/win32ole_error.c     | 3 +++
	 ext/win32ole/win32ole_error.h     | 4 ++--
	 ext/win32ole/win32ole_method.c    | 2 ++
	 ext/win32ole/win32ole_method.h    | 2 +-
	 ext/win32ole/win32ole_record.c    | 2 ++
	 ext/win32ole/win32ole_record.h    | 2 +-
	 ext/win32ole/win32ole_type.c      | 2 ++
	 ext/win32ole/win32ole_type.h      | 2 +-
	 ext/win32ole/win32ole_typelib.c   | 2 ++
	 ext/win32ole/win32ole_typelib.h   | 2 +-
	 ext/win32ole/win32ole_variable.c  | 2 ++
	 ext/win32ole/win32ole_variable.h  | 2 +-
	 ext/win32ole/win32ole_variant.c   | 2 ++
	 ext/win32ole/win32ole_variant.h   | 2 +-
	 ext/win32ole/win32ole_variant_m.c | 2 ++
	 ext/win32ole/win32ole_variant_m.h | 2 +-
	 18 files changed, 29 insertions(+), 11 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:58:46 +00:00
usa
ae1573ac73 merge revision(s) 12391cdbe11f3fbeb3b04c30b944139e5bbd9ea6: [Backport #16834]
merge revision(s) cbe4f75ef802f13d05f94e42274b65a062bd3666: [Backport
	 #16834]

		Fix rb_profile_frame_classpath to handle module singletons

		Right now `SomeClass.method` is properly named, but `SomeModule.method`
		is displayed as `#<Module:0x000055eb5d95adc8>.method` which makes
		profiling annoying.
	---
	 test/-ext-/debug/test_profile_frames.rb | 40 ++++++++++++++++++++++++++++-----
	 version.h                               |  2 +-
	 vm_backtrace.c                          |  2 +-
	 3 files changed, 36 insertions(+), 8 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:50:22 +00:00
usa
fe85a3d527 merge revision(s) 08529a61153e5c40f57a65272211357511d6e6db: [Backport #16798]
Compare environment variable names in those manor [Bug #16798]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:48:27 +00:00
usa
b98aa3aaae merge revision(s) 2f1895fa: [Backport #16767]
Fixed formatted substring expansion [Bug #16767]

	---
	 strftime.c             | 2 ++
	 test/ruby/test_time.rb | 7 +++++++
	 2 files changed, 9 insertions(+)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:44:23 +00:00
usa
febd8c91f6 merge revision(s) 2f1895fa15386fb3cdc91c5604171290828b9da8: [Backport #16767]
Fix source location of autoloaded constant [Bug #16764]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:41:01 +00:00
usa
49b37893a4 merge revision(s) e04418bb16cd99b4a4402e7457d3bdc967284f98: [Backport #16830]
[ruby/uri] Check if DN exists

	https://bugs.ruby-lang.org/issues/16830

	https://github.com/ruby/uri/commit/b4bf8c1217
	---
	 lib/uri/ldap.rb       | 1 +
	 test/uri/test_ldap.rb | 4 ++++
	 2 files changed, 5 insertions(+)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:27:35 +00:00
usa
43449fb995 merge revision(s) 579645d9: [Backport #17033]
Fixed infinite loop at error in printing cause [Bug #17033]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-04-04 22:24:29 +00:00
usa
f56a213a99 merge revision(s) e39f7e64: [Backport #16760]
parse.y: fix segv with Ripper#yydebug

	* parse.y (parser_token_value_print): in ripper, ID values are
	  wrapped in NODE_RIPPER at set_yylval_name(), so print the Symbol
	  wrapped together.

	git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	---
	 parse.y                    | 2 +-
	 test/ripper/test_ripper.rb | 9 +++++++++
	 2 files changed, 10 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 12:00:29 +00:00
usa
0fe5d0f60d merge revision(s) 99a9c3fe: [Backport #17024]
Fixed yday and wday with timezone [Bug #17024]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 11:44:02 +00:00
usa
34768ea9df merge revision(s) 2ecfb88e: [Backport #16918]
Correctly remove temporary directory if path yielded is mutated
	
	Another approach would be to freeze the string, but that could
	cause backwards compatibility issues.
	
	Fixes [Bug #16918]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 11:37:36 +00:00
usa
a175a30ab9 merge revision(s) 5a79d8e0,160511d8: [Backport #16925]
Fix error raised by Net::HTTPResponse#inflater if the block raises

	* See https://bugs.ruby-lang.org/issues/13882#note-6
	---
	 lib/net/http/response.rb                    |  5 ++-
	 spec/ruby/library/net/http/http/get_spec.rb | 67 +++++++++++++++++++++++++++++
	 2 files changed, 70 insertions(+), 2 deletions(-)

	Quarantine specs which fail frequently with CHECK_LEAKS=true

	---
	 spec/ruby/library/net/http/http/get_spec.rb | 2 ++
	 1 file changed, 2 insertions(+)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 11:26:58 +00:00
usa
efd499b211 merge revision(s) 0ba27259: [Backport #16940]
Fix crashes in the peephole optimizer on OpenBSD/sparc64

	These crashes are due to alignment issues, casting ADJUST to INSN
	and then accessing after the end of the ADJUST.  These patches
	come from Stefan Sperling <stsp@apache.org>, who reported the
	issue.
	---
	 compile.c | 5 +++--
	 1 file changed, 3 insertions(+), 2 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 11:25:18 +00:00
usa
82019f272d merge revision(s) a19228f8: [Backport #16979]
brace the fact that lchmod(2) can EOPNOTSUPP

	Musl libc has this function as a tiny wrapper of fchmodat(3posix).  On
	the other hand Linux kernel does not support changing modes of a symlink.
	The operation always fails with EOPNOTSUPP.  This fchmodat behaviour is
	defined in POSIX.  We have to take care of such exceptions.
	---
	 lib/fileutils.rb               |  3 ++-
	 test/pathname/test_pathname.rb |  2 +-
	 test/ruby/test_notimp.rb       | 19 ++++++++++++-------
	 3 files changed, 15 insertions(+), 9 deletions(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 11:23:42 +00:00
usa
dad70fa6a8 merge revision(s) 263b9413: [Backport #16981]
[ripper] fix mismatched indentations warning [Bug #16981]
	
	The scanner location has to be set from lex.ptok before it is
	flushed by dispatching the scanner event.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-02 11:21:10 +00:00
usa
e5bc1fea43 merge revision(s) e9bb30d4,a064e467,4d753461: [Backport #16998]
Expect no conflict in the parser

	---
	 parse.y | 1 +
	 1 file changed, 1 insertion(+)

	Support Bison 3

	---
	 common.mk           |  1 +
	 parse.y             |  2 +-
	 tool/pure_parser.rb | 15 +++++++++++++++
	 3 files changed, 17 insertions(+), 1 deletion(-)
	 create mode 100755 tool/pure_parser.rb

	Refine error message

	Highlight failed command and suggest installing the command.
	[Bug #16042]
	---
	 tool/pure_parser.rb | 7 ++++++-
	 1 file changed, 6 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-03-01 13:23:20 +00:00
usa
a7133b0571 merge revision(s) ac2106ac,cf90df22: [Backport #16813]
[DOC] Fixed explanation for Method#>> [Bug #16813] [ci skip]

	---
	 proc.c | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)

	[DOC] Separated Method#[] from Method#call [Bug #16813] [ci skip]

	---
	 proc.c | 14 +++++++++++++-
	 1 file changed, 13 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-02-28 15:06:26 +00:00
usa
f279c3a376 merge revision(s) 01b3a380: [Backport #11143][Backport #15932]
Fix wrong "void value expression" error

	* parse.y (value_expr_check): if either of then or else statements is not a void value expression, the whole if is not also a void value expression. [Bug #15932]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-02-28 15:04:13 +00:00
usa
4be089c0dd merge revision(s) e02bd0e7: [Backport #15608]
Don't display singleton class in Method#inspect unless method defined there
	
	Previously, if an object has a singleton class, and you call
	Object#method on the object, the resulting string would include
	the object's singleton class, even though the method was not
	defined in the singleton class.
	
	Change this so the we only show the singleton class if the method
	is defined in the singleton class.
	
	Fixes [Bug #15608]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2021-02-28 14:53:21 +00:00