Граф коммитов

86398 Коммитов

Автор SHA1 Сообщение Дата
Peter Zhu e5d12f9cce Move gc_impl.c to gc/gc_impl.c
This commit creates a new directory `gc` to put different GC
implementations and moves the default GC from gc_impl.c to gc/gc_impl.c.
The default GC can be easily switched using the `BUILTIN_GC` variable
in Makefile.in.
2024-07-11 09:09:47 -04:00
Jeremy Daer e1a034cb96
IBM864 single-byte transcoding (#10518)
Include € euro sign from CCSID 864
2024-07-11 17:03:14 +09:00
git a1f7432550 Update bundled gems list as of 2024-07-10 2024-07-11 06:59:45 +00:00
Jean Boussier 3de0e343e2 Do not warn about extra `format` argument when passed as keywords
[Bug #20593]

It's fairly common to use `format` to interpolate a number of values
into a user provided strings.

The arguments not matching are a problem when they are positional,
but when they are named, it's absolutely fine and we shouldn't
emit a warning.
2024-07-11 07:39:50 +02:00
João Pinheiro 72732af47e [ruby/open-uri] document max_redirects option
https://github.com/ruby/open-uri/commit/4a247e5ca1
2024-07-11 04:49:59 +00:00
João Pinheiro e62a0126cd [ruby/open-uri] apply default max_redirects
https://github.com/ruby/open-uri/commit/5d29e626bc
2024-07-11 04:49:59 +00:00
Yusuke Endoh e1238a1fab Enumerable#all?: Stop optimizing when a given block is not optimizable
This is a follow up to 182822683f.

Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
2024-07-11 12:28:23 +09:00
dependabot[bot] 724d95a713 Bump ruby/setup-ruby from 1.186.0 to 1.187.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.186.0 to 1.187.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](2a9a743e19...161cd54b69)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-11 12:03:49 +09:00
Dmitriy Ivliev 6dc0086d20 [rubygems/rubygems] fix s3 source configuration issue
https://github.com/rubygems/rubygems/commit/356726bd1a
2024-07-11 02:27:46 +00:00
Evgeni Golov bc1b4235fb [ruby/net-http] implement talking SSL to the proxy too
https://bugs.ruby-lang.org/issues/16482

https://github.com/ruby/net-http/commit/ae2d83f88b
2024-07-11 01:56:08 +00:00
fatkodima 70bdc0f777 [ruby/net-http] Add ability to configure default settings for new connections
https://github.com/ruby/net-http/commit/fed3dcd0c2
2024-07-11 01:51:03 +00:00
MSP-Greg 9f4b45fbf7 [ruby/net-http] test_https.rb - fix test_session_reuse_but_expire
https://github.com/ruby/net-http/commit/5544243c41
2024-07-11 01:22:10 +00:00
MSP-Greg d605fb54cf [ruby/net-http] net/http.rb - derive SSL_IVNAMES from SSL_ATTRIBUTES
https://github.com/ruby/net-http/commit/7191bb923b
2024-07-11 01:10:08 +00:00
Hiroshi SHIBATA 9a5e3a4007 Removed WEBrick and that tests
We can handle uri, time and others without `make test-all` dependencies now.
2024-07-11 09:23:16 +09:00
Jeremy Evans bfba96a106 Avoid a hash allocation when keyword splatting empty hash when calling ruby2_keywords method
Treat this similar to keyword splatting nil, using goto ignore.
However, keep previous behavior if the method accepts a keyword
splat, to avoid double hash allocation.

This also can avoid an array allocation when calling a method
that doesn't have any splat parameters but supports literal
keyword parameters, because ignore_keyword_hash_p was not
ignoring the keyword hash in that case.

This change doesn't remove the empty ruby2_keywords hash from
the array, which caused an assertion failure if the method
being called accepted keywords in some cases.  Modify the
assertion to handle this case.  An alternative approach would
add a flag to the args struct so the args_argc calculation could
handle this case and report the correct argc, but such an approach
would likely be slower.
2024-07-10 16:38:06 -07:00
git 8c69caa495 * append newline at EOF. [ci skip] 2024-07-10 23:06:20 +00:00
Hiroshi SHIBATA 840f7ebfde [ruby/net-http] Commented out unfinished chunked test
https://github.com/ruby/net-http/commit/6376592cb4
2024-07-10 23:06:10 +00:00
Hiroshi SHIBATA 492b505d95 [ruby/net-http] Removed needless warning
https://github.com/ruby/net-http/commit/d867edc0fe
2024-07-10 23:06:10 +00:00
Hiroshi SHIBATA b11aba503b [ruby/net-http] Split POST test because new dummy server can't handle continuouse POST request
https://github.com/ruby/net-http/commit/54a99b9f0c
2024-07-10 23:06:09 +00:00
Hiroshi SHIBATA e77bc17e5d [ruby/net-http] Write log after server start, not handling request
https://github.com/ruby/net-http/commit/205bac757a
2024-07-10 23:06:09 +00:00
Hiroshi SHIBATA 6428536146 [ruby/net-http] Split test class because TCPServer couldn't accept localhost and 127.0.0.1 both
https://github.com/ruby/net-http/commit/749a1b3197
2024-07-10 23:06:08 +00:00
Hiroshi SHIBATA 4e6463ad7a [ruby/net-http] Support chunked data and fixed test failure with multipart/form-data
https://github.com/ruby/net-http/commit/b38c2795a9
2024-07-10 23:06:08 +00:00
Hiroshi SHIBATA 87a45af105 [ruby/net-http] Removed server-side log test
https://github.com/ruby/net-http/commit/9c16c383ce
2024-07-10 23:06:07 +00:00
Hiroshi SHIBATA 5e6f04abc8 [ruby/net-http] Fix wrong hostname with test_max_version test
https://github.com/ruby/net-http/commit/f00d198433
2024-07-10 23:06:07 +00:00
Hiroshi SHIBATA c7eb9ac6f9 [ruby/net-http] Rewrite WEBrick server with TCPServer and OpenSSL::SSL::SSLServer
https://github.com/ruby/net-http/commit/b01bcf6d7f
2024-07-10 23:06:06 +00:00
Jeremy Evans 0ee3960685 Eliminate array allocations for single splat followed by mutable keywords
For calls such as:

  m(*ary, a: 2, **h)
  m(*ary, **h, **h, **h)

Where m does not take a positional argument splat, there was previously
an array allocation (splatarray true) to dup ary, even though it was not
necessary to do so.  This is because the elimination of the array allocation
(splatarray false) was performed in the optimizer, and the optimizer didn't
handle this case, because the instructions for the keywords can be of
arbitrary length.

Move part of the optimization from the optimizer to the compiler,
detecting parse trees of the form:

  ARGS_PUSH:
    head: SPLAT
    tail: HASH (without brace)

And using splatarray false instead of splatarray true for them.

Unfortunately, moving part of the optimization to the compiler broke
the hash allocation elimination optimization for calls of the
form:

  m(*ary, a: 2)

That's because the compiler had already set splatarray false,
and the optimizer code was looking for splatarray true.

Split the array allocation elimination and hash allocation
elimination in the optimizer so that the hash allocation
elimination will still apply if the compiler performs the
splatarray false optimization.
2024-07-10 14:45:38 -07:00
Maxime Chevalier-Boisvert 48e7112baa
YJIT: increase context cache size to 1024 (#10983)
* YJIT: increase context cache size to 1024

The other day I ran into a mysterious bug while increasing the
cache size to 1024. I was not able to reproduce this locally.
Opening this PR for testing/debugging.

* Add extra debug assertions

* Add more comments to context code

* Update yjit/src/core.rs

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>

* Update yjit/src/core.rs

* Comment out potentially problematic assertion

* Revert cache size to 512 so we can merge other changes

---------

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2024-07-10 19:45:23 +00:00
Peter Zhu 52a0dfd4bf Revert all changes to dln.c, dmydln.c, dln.h for the shared GC 2024-07-10 14:28:10 -04:00
Peter Zhu 64988e66d7 Allow miniruby to load shared GC
Since dln.c is replaced with dmydln.c for miniruby, we cannot load shared
GC for miniruby. This means that many tests do not have the shared GC
loaded and many tests fail because of the warning that emits in miniruby.

This commit changes shared GC to directly use dlopen for loading the
shared GC.
2024-07-10 14:28:10 -04:00
Peter Zhu 623eecce99 Use absolute path for shared_gc_dir 2024-07-10 09:21:12 -04:00
David Rodríguez 133fec4ce9 [rubygems/rubygems] Fix another strange error when running `bundle add` in frozen mode
If there's a lockfile, but it's out of sync with the Gemfile because a
dependency has been deleted, and frozen mode is set, Bundler will print
the following strange error:

```
$ bundle add rake
, but the lockfile can't be updated because frozen mode is set

You have deleted from the Gemfile:
* rake (~> 13.2)

Run `bundle install` elsewhere and add the updated Gemfile to version control.
```

This commit changes the error to:

```
Some dependencies were deleted from your gemfile, but the lockfile can't be updated because frozen mode is set

You have deleted from the Gemfile:
* rake (~> 13.2)

Run `bundle install` elsewhere and add the updated Gemfile to version control.
```

https://github.com/rubygems/rubygems/commit/452da4048d
2024-07-10 08:04:07 +00:00
David Rodríguez 7e612b7414 [rubygems/rubygems] Fix strange error when running `bundle add` with frozen mode set
If Gemfile is empty and there's no lockfile (situation after `bundle init`), and
`frozen` is configured, running `bundle add` will result in an strange
error, like this:

```
$ bundle add rake
, but the lockfile can't be updated because frozen mode is set

You have deleted from the Gemfile:
* rake (~> 13.2)

Run `bundle install` elsewhere and add the updated Gemfile to version control.
```

This commit fixes the problem to instead print

https://github.com/rubygems/rubygems/commit/152331a9dc
2024-07-10 08:04:07 +00:00
Yusuke Endoh 182822683f Use rb_block_call2 for some Enumerable methods
Enumerable#all?, #any?, #one?, and #none? do not use yielded arguments
as an Array. So they can use rb_block_call2 to omit array allocatoin.

Enumerable#find does not have to immediately accept yielded arguments as
an Array. It can delay array allocation until the predicate block
returns truthy.

(TODO: Enumerable#count and #find_all seem to be optimizable as well.)
2024-07-10 13:00:47 +09:00
Yusuke Endoh 114e32b357 Add rb_block_call2, a flexible variant of rb_block_call
This function accepts flags:

RB_NO_KEYWORDS, RB_PASS_KEYWORDS, RB_PASS_CALLED_KEYWORDS:
Works as the same as rb_block_call_kw.

RB_BLOCK_NO_USE_PACKED_ARGS:
The given block ("bl_proc") does not use "yielded_arg" of rb_block_call_func_t.
Instead, the block accesses the yielded arguments via "argc" and "argv".
This flag allows the called method to yield arguments without allocating an Array.
2024-07-10 13:00:47 +09:00
卜部昌平 77b12a8aaf GC_DEBUG is always defined
`#ifdef` is inadequate.
2024-07-10 12:15:35 +09:00
卜部昌平 c49eda91bf rb_source_location_cstr is banned in this file
Raison d'etre du gc_impl.c is to purge any internal constructs and rely
solely on our public APIs. rb_source_location_cstr is not public.
2024-07-10 12:15:35 +09:00
卜部昌平 1f15149e98 rb_gc_obj_slot_size is banned in this file
Raison d'etre du gc_impl.c is to purge any internal constructs and rely
solely on our public APIs. rb_gc_obj_slot_size is not public.
2024-07-10 12:15:35 +09:00
dependabot[bot] ef2afe82eb Bump ruby/setup-ruby from 1.185.0 to 1.186.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.185.0 to 1.186.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](3a77c29278...2a9a743e19)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 11:57:21 +09:00
eileencodes 6f6aff56b1 Don't shrink array in `ary_make_shared`
This change adds back the assertions removed in #11092 and removes the
call to `ary_shrink_capa` from `ary_make_shared` when the array is
frozen.
2024-07-09 10:22:29 -07:00
Peter Zhu c1ff8d519f Fix grammar of ruby_shared_gc.m4 2024-07-09 13:14:28 -04:00
David Rodríguez 140d8318db [rubygems/rubygems] Fix generic platform gems getting incorrectly removed when locked for a specific platform
If they are already in the lockfile as the most specific variant for a
platform, we shouldn't change that unless explicitly unlocking.

https://github.com/rubygems/rubygems/commit/a901660498
2024-07-09 16:34:09 +00:00
David Rodríguez e6c7a309d0 [rubygems/rubygems] Refactor selecting specs from a SpecSet
https://github.com/rubygems/rubygems/commit/bcbbff5149
2024-07-09 16:34:09 +00:00
David Rodríguez dd05191bc3 [rubygems/rubygems] Resolve all platforms directly
Instead of having to do a complete pass after resolve.

To do this, we add to the ruby group all the platform specs with the
same dependencies as the ruby specs.

https://github.com/rubygems/rubygems/commit/e50415f2a6
2024-07-09 16:34:08 +00:00
David Rodríguez 00acc70348 [rubygems/rubygems] Don't memoize sorted_spec_names
It's just for debugging and a simple method, so no need.

https://github.com/rubygems/rubygems/commit/3230425a9a
2024-07-09 16:34:08 +00:00
David Rodríguez 086cde1651 [rubygems/rubygems] Instantiate `Resolver::SpecGroup` with explicit priority
https://github.com/rubygems/rubygems/commit/e2c1bc1b6c
2024-07-09 16:34:07 +00:00
David Rodríguez 5fdfdc30f1 [rubygems/rubygems] Let resolver consider unique specs from the beginning
It results in more consistent error messages.

https://github.com/rubygems/rubygems/commit/a4b34361cc
2024-07-09 16:34:07 +00:00
David Rodríguez a333e867aa [rubygems/rubygems] Fix spec to also pass outside of Linux
https://github.com/rubygems/rubygems/commit/fc8c853345
2024-07-09 16:34:06 +00:00
David Rodríguez 1d97c46b35 [rubygems/rubygems] Minor Bundler spec improvements
While working on something else I noticed:

* Usage of uppercased "RUBY" and "JAVA" as platforms, when those don't
  really exist.
* Usage of some test gems with "1.0" as gemspec version and "1.0.0" as
  actual version.

This commit fixes both inconsistencies to make things more expectable.

https://github.com/rubygems/rubygems/commit/e3ec32e247
2024-07-09 14:43:18 +00:00
dependabot[bot] ac0e0f0c76 [rubygems/rubygems] Bump rb-sys
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.97 to 0.9.98.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.97...v0.9.98)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

https://github.com/rubygems/rubygems/commit/d2846130bc
2024-07-09 14:42:40 +00:00
Burdette Lamar 30b9912bb7
[DOC] Doc for Float#ceil (#11125) 2024-07-09 09:43:07 -04:00