Commit graph

16449 commits

Author SHA1 Message Date
Sutou Kouhei
6d01b66764 [ruby/fiddle] test: ensure GC-ing closures
GitHub: fix GH-102

We can't use Fiddle::Closure before we fork the process. If we do it,
the process may be crashed with SELinux.

See https://github.com/ruby/fiddle/issues/102#issuecomment-1241763091
for details.

Reported by Vít Ondruch. Thanks!!!

1343ac7a95
2022-10-07 15:18:49 +09:00
Nobuyoshi Nakada
1b7c5c394f [ruby/date] Fix misplaced time zone offset checks
d21c69450a
2022-10-07 14:41:31 +09:00
Nobuyoshi Nakada
a87de5e3c1 [ruby/rdoc] Special characters are prohibited as filename on Windows
13b9da5932
2022-10-07 12:12:10 +09:00
Nobuyoshi Nakada
a3cb09c7d1 [ruby/rdoc] Escape file names
https://hackerone.com/reports/1321358

8c07cc4657
2022-10-07 12:12:08 +09:00
Nobuyoshi Nakada
8d0b2162a0 [ruby/rdoc] Escape main title
https://hackerone.com/reports/1187156

5dedb5741d
2022-10-07 12:09:23 +09:00
Nobuyoshi Nakada
586e18b946 [ruby/rdoc] Escape HYPERLINKs
ac35485be6
2022-10-07 12:09:22 +09:00
Nobuyoshi Nakada
9e3ab9da7f [ruby/rdoc] Escape RDOCLINKs
https://hackerone.com/reports/1187156

7cecf1efae
2022-10-07 12:09:21 +09:00
Nobuyoshi Nakada
deaa656608 [ruby/rdoc] Escape TIDYLINKs
https://hackerone.com/reports/1187156

1ad2dd3ca2
2022-10-07 12:09:20 +09:00
Peter Zhu
3df904d1a8 Add debug output to test_thrashing_for_young_objects
The test is failing only on trunk-repeat50@phosphorus-docker. This
commit adds some debugging output to debug the failure.
2022-10-06 13:46:31 -04:00
Nobuyoshi Nakada
cf3056be69 [ruby/rdoc] Add center align
512cc55a0e
2022-10-06 23:22:02 +09:00
Nobuyoshi Nakada
28e24ce355 [ruby/rdoc] Allow spaces around pipes
3b3a583580
2022-10-06 23:21:16 +09:00
Nobuyoshi Nakada
7c03c82444 [ruby/rdoc] Allow escaped pipes in cells
333952a62d
2022-10-06 23:17:49 +09:00
Nobuyoshi Nakada
f6c916c7ef [ruby/rdoc] Allow leading pipes to be ommitted
d263a2c9c4
2022-10-06 23:16:54 +09:00
Nobuyoshi Nakada
a19bf47d03 [ruby/rdoc] Allow trailing pipes to be ommitted
1318048877
2022-10-06 23:14:29 +09:00
Samuel Williams
e696ec67ac
Introduce Fiber.blocking{} for bypassing the fiber scheduler. (#6498) 2022-10-06 23:00:49 +13:00
Nobuyoshi Nakada
75a53f6be0 [ruby/rdoc] Allow RDoc markups in table cells
b16d3f1727
2022-10-06 18:24:44 +09:00
Nobuyoshi Nakada
e929b0aac5 [ruby/rdoc] Add RDoc::Markup::ToHtml#accept_table test
0cb3df713b
2022-10-06 18:24:43 +09:00
Nishant Patel
43e925090b [ruby/open-uri] fix: added test case that validates that bad TLS version is silently ignored
4b91b11730
2022-10-06 18:00:58 +09:00
Nishant Patel
cdbaac3f4b [ruby/open-uri] feat: allow option to pass version of SSL / TLS to use during communication. Allow versions are OpenSSL::SSL::SSLContext::METHODS
8729858517
2022-10-06 18:00:57 +09:00
Hiroshi SHIBATA
7f80ec47c3 [ruby/open-uri] Use omit instead of skip for test-unit
63f466d6ed
2022-10-06 17:15:27 +09:00
Hiroshi SHIBATA
cc5313ceab [ruby/open-uri] Run global constant count test only under Ruby 3.2
a8f1605ae9
2022-10-06 17:15:26 +09:00
Jean Boussier
d15b38d944 [ruby/open-uri] Avoid busting the global constant cache
`Object#extend(mod)` bump the global constant cache if the module
has constants of its own.

So by moving these constants outside of `Meta` we avoid bumping
the cache.

363c399bac
2022-10-06 16:55:44 +09:00
Imir Kiyamov
83a6213f31 [ruby/irb] Fixed sort of variables in completion
5842888255
2022-10-05 19:22:13 +09:00
Nobuyoshi Nakada
cbd82f5250
Cannot define from defined Data class again 2022-10-03 23:28:01 +09:00
David Rodríguez
b7a61cb485 [rubygems/rubygems] Revert "Cleaup unnecessary code"
Unclear why, but 2e05dadbc5 created some
warnings in ruby-core CI, so let's revert it.

729ce3a6e1
2022-10-03 19:54:24 +09:00
osyo-manga
7b88ffb34f [ruby/irb] Change to explicit method call in completion (https://github.com/ruby/irb/pull/369)
Ensure that methods are called even when local variables are defined.
see: https://github.com/ruby/irb/issues/368

c34d54b8bb
2022-10-03 06:55:53 +09:00
Nobuyoshi Nakada
de9c612d63
Also the tests should use the configured pkg-config 2022-10-02 15:19:14 +09:00
Aaron Patterson
9a6803c90b
Revert "This commit implements the Object Shapes technique in CRuby."
This reverts commit 68bc9e2e97d12f80df0d113e284864e225f771c2.
2022-09-30 16:01:50 -07:00
eileencodes
0ab0229c11 Fix frozen object inspect
In the rails/rails CI build for Ruby master we found that some tests
were failing due to inspect on a frozen object being incorrect.

An object's instance variable count was incorrect when frozen causing
the object's inspect to not splat out the object.

This fixes the issue and adds a test for inspecting frozen objects.

Co-Authored-By: Jemma Issroff <jemmaissroff@gmail.com>
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2022-09-30 13:57:59 -07:00
David Rodríguez
f04d249e83 [rubygems/rubygems] Fix matching of eabihf platforms
a03d30cd58
2022-10-01 05:46:40 +09:00
David Rodríguez
8252ea2140 [rubygems/rubygems] Fix matching of linux platforms with eabi modifiers
89362c18ef

Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
2022-10-01 05:46:40 +09:00
tompng
641310ce37 [ruby/irb] Fix ripper_lex_without_warning duplicated heredoc token
45b539af39
2022-10-01 04:17:15 +09:00
Victor Shepelev
ad651925e3
Add Data class implementation: Simple immutable value object 2022-09-30 18:23:19 +09:00
Yusuke Endoh
962f9932af [rubygems/rubygems] Prevent a "warning: assigned but unused variable - data"
ec3fd55d40
2022-09-30 15:50:46 +09:00
Benoit Daloze
aa490f9442 Reduce diff to proc.c @ b0b9f7201a
* So it's easy to review https://github.com/ruby/ruby/pull/6242 +
  https://github.com/ruby/ruby/pull/6467 and there are less changes
  overall.
2022-09-29 15:48:35 +02:00
Benoit Daloze
c6319026ca Extend tests for a zsuper method of which the method it resolved to has been removed 2022-09-29 15:48:35 +02:00
Benoit Daloze
6b7d32a5e5 Resolve zsuper method during lookup but preserve owner separately
* See https://bugs.ruby-lang.org/issues/18729#note-34
* See [Bug #18729]
2022-09-29 15:48:35 +02:00
Jenny Shen
28840d74c2 [rubygems/rubygems] Refine error message to check the push URL instead of just the host
46990f3292
2022-09-29 17:56:36 +09:00
Jenny Shen
0522e31d57 [rubygems/rubygems] Refactor tests to use Net::HTTPResponse instances for fetcher.data[:path]
4d91cacb1f

Co-authored-by: Jacques Chester <jacques.chester@shopify.com>
2022-09-29 17:56:36 +09:00
Jenny Shen
17b783ad9e [rubygems/rubygems] Surface entire redirect uri in permanent redirections
da7837630b
2022-09-29 17:56:35 +09:00
Jenny Shen
1cbf0fd863 [rubygems/rubygems] Add error message when api response is a permanent redirect
ccca30c77a

Co-authored-by: Nick Schwaderer <nick.schwaderer@shopify.com>
2022-09-29 17:56:34 +09:00
Nobuyoshi Nakada
cb16dcb184 [ruby/date] The shrunk words to be copied is limited
Th buffer size is small enough and no need to allocate dynamically.

f62bf0a01d
2022-09-29 14:56:39 +09:00
Nobuyoshi Nakada
5a8aaedaff [ruby/date] Narrow ALLOCV region for shrunk words
f51b038074
2022-09-29 14:06:36 +09:00
Samuel Williams
bd2fbd3588
Add Coverage.supported? to detect what modes are supported. 2022-09-29 09:44:14 +13:00
Samuel Williams
9dd902b831
Add eval: true/false flag to Coverage.setup. 2022-09-29 09:44:14 +13:00
David Rodríguez
ac56e5c1ab [rubygems/rubygems] Put bundler gemspec stub at the right place
So that it's found when needed, rather than dynamically modifying
loaded stubs and thus messing with RubyGems internals.

cd3e7cb9e5
2022-09-29 03:41:53 +09:00
David Rodríguez
668e78f01b [rubygems/rubygems] Only activate bundler when needed
Loading Bundler beforehand was actually replacing ENV with a backup of
the pre-Bundler environment through `Bundler::EnvironmentPreserver`. I
think that was making a bug in `ENV.replace` not bite our tests, because
Bundler includes proper patches to workaround that issue. So this commit
also includes these patches in RubyGems tests.

8e079149b9
2022-09-29 03:41:52 +09:00
David Rodríguez
20eff52087 [rubygems/rubygems] Test a pure RubyGems method
`Gem::Specification#load_paths` is actually a Bundler thing.

d20b4d1950
2022-09-29 03:41:52 +09:00
David Rodríguez
00a040dda3 [rubygems/rubygems] Little refactor to keep things consistent
3934deb4e4
2022-09-29 03:41:51 +09:00
David Rodríguez
874a2bf17c [rubygems/rubygems] Remove unnecessary ensure
6c0c02c533
2022-09-29 03:41:51 +09:00