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

78060 Коммитов

Автор SHA1 Сообщение Дата
Peter Zhu c3dc9fcc70 Fix heap growth in GC.verify_compaction_references
We should grow by at least gc_params.heap_init_slots, but the previous
calculation was incorrect.
2023-06-06 10:18:50 -04:00
dependabot[bot] 1f64301e12 Bump octokit/request-action from 2.1.8 to 2.1.9
Bumps [octokit/request-action](https://github.com/octokit/request-action) from 2.1.8 to 2.1.9.
- [Release notes](https://github.com/octokit/request-action/releases)
- [Commits](352d2ae93e...89697eb663)

---
updated-dependencies:
- dependency-name: octokit/request-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 12:42:29 +09:00
David Rodríguez 79e8d91410 [rubygems/rubygems] Delay cache access in `LockfileParser`
It's the only part that needs "root folder resultion" to figure out the
folder for the cache, but it's only needed for some things, so run that
logic lazily when needed.

https://github.com/rubygems/rubygems/commit/c7b9eae0bc
2023-06-06 10:52:57 +09:00
David Rodríguez 03246719cc [rubygems/rubygems] Fix `path` vs `deployment` precedence when path set through ENV
The `deployment` setting sets `path` to `vendor/bundle` implicitly, but
that should only apply if `path` is not set explicitly, at any level.

https://github.com/rubygems/rubygems/commit/3552c064c1
2023-06-06 10:52:57 +09:00
David Rodríguez 7b317243ad [rubygems/rubygems] Unexclude some specs on bundler 3
These should all be passing on Bundler 3.

https://github.com/rubygems/rubygems/commit/4a8c172965
2023-06-06 10:52:56 +09:00
David Rodríguez 6353f1d5e8 [rubygems/rubygems] Fill in missing deployment specs
https://github.com/rubygems/rubygems/commit/e16aa47b8f
2023-06-06 10:52:56 +09:00
David Rodríguez 603772440c [rubygems/rubygems] Remove redundant specs
They are already tested above.

https://github.com/rubygems/rubygems/commit/23073dcece
2023-06-06 10:52:55 +09:00
David Rodríguez 8819dc4323 [rubygems/rubygems] Always rely on $LOAD_PATH when jumping from exe to lib
Normally, we use `require_relative` when requiring internal code.
However, Bundler may also load external code (for example, bundler
plugins), and when that external code loads Bundler itself, using
`require_relative` without setting up the `$LOAD_PATH` may lead into
double load errors.

For example, when testing a Gemfile using plugins using our source code
tree, I get the following:

```
➜ plugins-dup ~/Code/rubygems/rubygems/bundler/exe/bundle
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.5.0.dev
Installing extended_bundler-errors 0.3.3
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/version.rb:4: warning: already initialized constant Bundler::VERSION
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/version.rb:4: warning: previous definition of VERSION was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:5: warning: already initialized constant Bundler::Worker::POISON
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/worker.rb:5: warning: previous definition of POISON was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:183: warning: already initialized constant Bundler::FileUtils::VERSION
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:183: warning: previous definition of VERSION was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2165: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2165: warning: previous definition of S_IF_DOOR was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2461: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2461: warning: previous definition of DIRECTORY_TERM was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2569: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2569: warning: previous definition of OPT_TABLE was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2627: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2627: warning: previous definition of LOW_METHODS was here
/Users/deivid/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/bundler/vendor/fileutils/lib/fileutils.rb:2634: warning: already initialized constant Bundler::FileUtils::METHODS
/Users/deivid/Code/rubygems/rubygems/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb:2634: warning: previous definition of METHODS was here
Failed to install plugin `extended_bundler-errors`, due to Bundler::Plugin::MalformattedPlugin (ArgumentError: Trying to register Bundler::GemfileError for status code 4 but
Bundler::GemfileError is already registered)
```

Changing this to always use `$LOAD_PATH` fixes the problem.

https://github.com/rubygems/rubygems/commit/121a861c39
2023-06-06 10:52:54 +09:00
David Rodríguez 1f9e66836b [rubygems/rubygems] Fix inline mode with multiple sources
If we're in inline mode, Bundler first resolves using only local gems,
and if some gems are missing, then it re-resolves using remote gems.
However, "source resolution" from the initial "local" try was being
memoized, resulting in Bundler not looking for some gems remotely in the
second resolution.

This commit forces a proper re-resolve in this case.

https://github.com/rubygems/rubygems/commit/fdc631075e
2023-06-06 10:52:53 +09:00
Takashi Kokubun ebe1077330
YJIT: Fix a warning on cargo test (#7909) 2023-06-05 14:58:04 -07:00
Takashi Kokubun 2e14a65309 Add an example for rust-analyzer.cargo.unsetTest [ci skip] 2023-06-05 14:01:37 -07:00
Peter Zhu 2543a6573f Implement Struct on VWA
The benchmark results show that this feature has either a positive or
no impact on performance. The memory usage is also mostly unchanged,
except in hexapdf, where there is a decrease in RSS.

--------------  -----------  ----------  ---------  -----------  ----------  ---------  --------------  -------------
bench           master (ms)  stddev (%)  RSS (MiB)  branch (ms)  stddev (%)  RSS (MiB)  branch 1st itr  master/branch
activerecord    70.8         2.2         56.0       71.7         2.2         56.0       0.99            0.99
erubi_rails     20.5         13.6        94.7       20.5         14.3        94.2       0.93            1.00
hexapdf         2541.0       0.7         212.8      2544.4       0.7         203.4      1.00            1.00
liquid-c        65.6         0.3         38.9       65.3         0.3         38.9       1.01            1.01
liquid-compile  63.7         0.3         34.6       61.1         0.2         34.6       1.04            1.04
liquid-render   163.1        0.1         37.1       163.3        0.1         37.1       1.00            1.00
mail            139.3        0.1         50.5       137.0        0.1         50.1       0.99            1.02
psych-load      2065.7       0.1         36.9       2068.2       0.1         37.3       1.00            1.00
railsbench      2034.6       0.5         103.9      2031.9       0.5         103.8      1.02            1.00
ruby-lsp        65.3         3.1         89.8       66.2         3.0         89.7       1.01            0.99
sequel          73.2         1.0         40.3       73.4         1.0         40.3       1.00            1.00
--------------  -----------  ----------  ---------  -----------  ----------  ---------  --------------  -------------
2023-06-05 15:47:16 -04:00
Stan Lo 45ff2f4a89 [ruby/irb] Refactor ExtendCommand::Nop
(https://github.com/ruby/irb/pull/598)

* Rename conf to irb_context

* Drop Nop#irb method because it's only used by irb/ext/loader.rb

We don't need to expose this method to all command classes, especially
when it's just an alias of `irb_context.irb`.
2023-06-05 19:12:16 +00:00
Stan Lo 273b38475e [ruby/irb] Simplify irb_info command
(https://github.com/ruby/irb/pull/597)

https://github.com/ruby/irb/commit/0a0409c52b
2023-06-05 19:02:43 +00:00
ima1zumi 76ee4edb97 [ruby/irb] Fixed string escaping omissions
(https://github.com/ruby/irb/pull/599)

I received a `RegexpError` when I typed `::Array[`.
::Array[/Users/mi/ghq/github.com/ruby/irb/lib/irb/completion.rb:236:in `retrieve_completion_data': premature end of char-class: /^Array[/ (RegexpError)
2023-06-05 18:34:10 +00:00
eileencodes 135a5eb716 Add missing write barrier
We were missing the write barrier for class_value to cref. This should
fix the segv we were seeing in http://ci.rvm.jp/logfiles/brlog.trunk-gc-asserts.20230601-165052

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-06-05 11:11:12 -07:00
eileencodes 40f090f433 Revert "Revert "Fix cvar caching when class is cloned""
This reverts commit 10621f7cb9.

This was reverted because the gc integrity build started failing. We
have figured out a fix so I'm reopening the PR.

Original commit message:

Fix cvar caching when class is cloned

The class variable cache that was added in
ruby#4544 changed the behavior of class
variables on cloned classes. As reported when a class is cloned AND a
class variable was set, and the class variable was read from the
original class, reading a class variable from the cloned class would
return the value from the original class.

This was happening because the IC (inline cache) is stored on the ISEQ
which is shared between the original and cloned class, therefore they
share the cache too.

To fix this we are now storing the `cref` in the cache so that we can
check if it's equal to the current `cref`. If it's different we don't
want to read from the cache. If it's the same we do. Cloned classes
don't share the same cref with their original class.

This will need to be backported to 3.1 in addition to 3.2 since the bug
exists in both versions.

We also added a marking function which was missing.

Fixes [Bug #19379]

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-06-05 11:11:12 -07:00
Hiroshi SHIBATA 29ea3c5aaa [rubygems/rubygems] Try again with https://github.com/rubygems/rubygems/pull/6693
https://github.com/rubygems/rubygems/commit/73c0d5f059
2023-06-05 17:10:49 +00:00
Nobuyoshi Nakada 3cdafe9be1 Move per sections in help message 2023-06-05 23:59:39 +09:00
Nobuyoshi Nakada b5467ae38a Add additional info for `-0` to `--help` message 2023-06-05 23:59:39 +09:00
Nobuyoshi Nakada feb946c3e2 Fold option lines in help message 2023-06-05 23:59:39 +09:00
Peter Zhu 1a7ee14578 [DOC] Update flags doc for strings
The length of an embedded string is no longer in the flags.
2023-06-05 09:49:35 -04:00
Daniel Pepper 542c70aab7 [ruby/singleton] Simplify implementation of `Singleton#instance`.
(https://github.com/ruby/singleton/pull/9)

- Add more tests to cover rails' usage.
2023-06-05 04:29:37 +00:00
Yla Aioi 3fe0f8c68b
[Bug #19685]: Add `-y` and `--yydebug` document to `--help`
Add -y option information to `--help`
Fix a warning on the man page
2023-06-05 12:05:58 +09:00
Hiroshi SHIBATA 3a4302c742 [ruby/singleton] Revert "Simplify the implementation
(https://github.com/ruby/singleton/pull/7)"

This reverts commit https://github.com/ruby/singleton/commit/545b6b61a40d.

  This change break Rails CI: https://bugs.ruby-lang.org/issues/19711

https://github.com/ruby/singleton/commit/911531d508
2023-06-05 01:10:26 +00:00
git 068672cfe8 Update default gems list at 4275a8098e [ci skip] 2023-06-04 15:25:17 +00:00
Stan Lo 4275a8098e [ruby/irb] Bump version to 1.7.0
(https://github.com/ruby/irb/pull/596)

https://github.com/ruby/irb/commit/c2e7002867
2023-06-04 15:24:30 +00:00
Nobuyoshi Nakada 73a31546aa
Attrset name is not allowed as an attribute 2023-06-03 20:50:40 +09:00
Nobuyoshi Nakada 4589056384 Exit with a failure if any test files failed to load 2023-06-03 20:22:10 +09:00
git 1bb7c3c447 Update default gems list at e6bd1852fb [ci skip] 2023-06-03 08:28:54 +00:00
Stan Lo e6bd1852fb [ruby/reline] Bump version to 0.3.5
(https://github.com/ruby/reline/pull/548)

https://github.com/ruby/reline/commit/4330a52572
2023-06-03 08:28:02 +00:00
Samuel Williams 0402193723
Fix `Thread#join(timeout)` when running inside the fiber scheduler. (#7903) 2023-06-03 12:41:36 +09:00
Vinicius Stock a4d92475f6 [ruby/rdoc] Auto-correct trailing new lines
https://github.com/ruby/rdoc/commit/4b68c0728a
2023-06-03 01:42:29 +00:00
yui-knk 7b803eafa2 Ripper does not depend on Bison [ci skip]
It also uses Lrama then no dependency on Bison.
2023-06-03 10:34:24 +09:00
Daniel Pepper bebd05fb51 [ruby/singleton] Simplify the implementation
(https://github.com/ruby/singleton/pull/7)

Remove `__init__` and move logic to `included`.
2023-06-03 00:35:18 +00:00
Takashi Kokubun 4e26ae3cb9
YJIT: Use #[cfg] instead of if cfg! (#7899) 2023-06-02 14:16:52 -07:00
Jean Boussier 22bea37cfc Stabilize test_latest_gc_info_need_major_by
Fix:
```
    1) Failure:
  TestGc#test_latest_gc_info_need_major_by [/home/runner/work/ruby/ruby/src/test/ruby/test_gc.rb:266]:
  <nil> expected to not be nil.
```

`GC.stat(:major_gc_count)` can be bumped while `GC.latest_gc_info(:need_major_by)` is still nil.
2023-06-02 16:11:45 +02:00
Stan Lo 8305681729 [ruby/irb] Require `test/lib` helpers from main test helper
(https://github.com/ruby/irb/pull/595)

Because they are handled differently in `ruby/irb` and `ruby/ruby`.
2023-06-02 13:54:07 +00:00
Nobuyoshi Nakada e38fb050fa [ruby/reline] Remove unnecessary conditions for
`Fiddle::TYPE_VARIADIC`
(https://github.com/ruby/reline/pull/547)

https://github.com/ruby/reline/commit/71ba3a9432
2023-06-02 12:18:06 +00:00
git d7e82512e4 Update default gems list at c32a30ec09 [ci skip] 2023-06-02 08:21:30 +00:00
Hiroshi SHIBATA c32a30ec09 [ruby/stringio] Development of 3.0.8 started.
https://github.com/ruby/stringio/commit/1587d3698e
2023-06-02 08:20:38 +00:00
Nobuyoshi Nakada 21b61b21c2
Fix the case no file under bin directory
NMake cannot handle empty expanded targets.
2023-06-02 16:58:55 +09:00
Nobuyoshi Nakada 729b92ea46 [ruby/uri] Drop support for 2.4
https://github.com/ruby/uri/commit/21baf2ba16
2023-06-02 05:27:06 +00:00
dependabot[bot] 5a3c782a1d Bump octokit/request-action from 2.1.7 to 2.1.8
Bumps [octokit/request-action](https://github.com/octokit/request-action) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/octokit/request-action/releases)
- [Commits](89a1754fe8...352d2ae93e)

---
updated-dependencies:
- dependency-name: octokit/request-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-02 12:44:32 +09:00
yui-knk 3a4206c7a1 No need to define "BISON" on extconf.rb
"BISON" is defined in "ext/ripper/depend".
2023-06-02 09:28:30 +09:00
Aaron Patterson 10621f7cb9
Revert "Fix cvar caching when class is cloned"
This reverts commit 77d1b08247.
2023-06-01 14:55:36 -07:00
Stan Lo 2d2893f206 [ruby/irb] Improve debug command tests
(https://github.com/ruby/irb/pull/594)

* Use require_relative for envutil.rb

Requiring test helper files with `require_relative` allows running the tests
with `ruby -Itest test/irb/test_debug_cmd.rb` without having to set up
the load path.

* Replace reline hack with TERM=dumb
2023-06-01 20:10:13 +00:00
Takashi Kokubun 39968112f5
YJIT: Introduce RubyVM::YJIT.stats_string (#7857)
* YJIT: Introduce RubyVM::YJIT.printed_stats

* Use #string instead

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>

* Rename it to #stats_string

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>

---------

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-06-01 09:16:21 -07:00
eileencodes 77d1b08247 Fix cvar caching when class is cloned
The class variable cache that was added in
https://github.com/ruby/ruby/pull/4544 changed the behavior of class
variables on cloned classes. As reported when a class is cloned AND a
class variable was set, and the class variable was read from the
original class, reading a class variable from the cloned class would
return the value from the original class.

This was happening because the IC (inline cache) is stored on the ISEQ
which is shared between the original and cloned class, therefore they
share the cache too.

To fix this we are now storing the `cref` in the cache so that we can
check if it's equal to the current `cref`. If it's different we don't
want to read from the cache. If it's the same we do. Cloned classes
don't share the same cref with their original class.

This will need to be backported to 3.1 in addition to 3.2 since the bug
exists in both versions.

We also added a marking function which was missing.

Fixes [Bug #19379]

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2023-06-01 08:52:48 -07:00
Samuel Williams b7ee51e81d
Expose `enum rb_io_event` flags without `_t` suffix. (#7887) 2023-06-01 22:54:08 +09:00