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

81841 Коммитов

Автор SHA1 Сообщение Дата
Martin Emde 1e5c8afb15 [rubygems/rubygems] Ensure that the lockfile mtime is not altered on frozen install
https://github.com/rubygems/rubygems/commit/6847709ee0
2023-12-12 02:39:57 +00:00
NARUSE, Yui 6b3abcf462 fix regexp pattern of diff 2023-12-12 11:22:40 +09:00
Samuel Giddins e223dde329 [rubygems/rubygems] Allow bundle pristine to run in parallel
Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands

https://github.com/rubygems/rubygems/commit/a555fd6ccd
2023-12-12 02:10:53 +00:00
Nobuyoshi Nakada 305f66b859
Save $VERBOSE properly 2023-12-12 11:06:27 +09:00
Yusuke Endoh 73b43fffa1 Prevent a warning: assigned but unused variable - status 2023-12-12 10:31:37 +09:00
Yusuke Endoh 207dcf07e1 Prevent a warning: method redefined 2023-12-12 10:31:37 +09:00
Yusuke Endoh cfb8494d54 Prevent warning: possibly useless use of a literal in void context 2023-12-12 10:31:37 +09:00
Yusuke Endoh 0c287df3bc Prevent a warning: setting Encoding.default_external 2023-12-12 10:31:37 +09:00
Yusuke Endoh 535eb4de11 Remove unused statement
... to disable a warning: assigned but unused variable - expected
2023-12-12 10:31:37 +09:00
Franz Liedke 6414f260fc [rubygems/rubygems] Refactor: Wrap filesystem access
https://github.com/rubygems/rubygems/commit/119d4bdc09
2023-12-12 01:08:20 +00:00
Franz Liedke 0653fb026c [rubygems/rubygems] Refactor: Move filesystem access into Definition class
https://github.com/rubygems/rubygems/commit/2720da2659
2023-12-12 01:08:20 +00:00
Franz Liedke 0ec88b54f3 [rubygems/rubygems] bundle lock: Always touch the lockfile
https://github.com/rubygems/rubygems/commit/fd2e71dfdb
2023-12-12 01:08:19 +00:00
David Rodríguez 8c2480c9ed
Unlock tilt since we no longer support Ruby 2.6 2023-12-12 10:04:57 +09:00
David Rodríguez a848c070d2
[rubygems/rubygems] Remove doc not adding much value
https://github.com/rubygems/rubygems/commit/c241a88962
2023-12-12 10:04:57 +09:00
Martin Emde 0e05392dcc
[rubygems/rubygems] Make tests compatible with paths that contain a + char
https://github.com/rubygems/rubygems/commit/3355c80c90
2023-12-12 10:04:57 +09:00
Martin Emde 3b9ea6648f
[rubygems/rubygems] Use StringIO 3.1.0 in tests to work with ruby 3.3.0
https://github.com/rubygems/rubygems/commit/8a936d733d
2023-12-12 10:04:57 +09:00
David Rodríguez 0b24c71a5a
[rubygems/rubygems] Improve enabling bundled gems warnings
https://github.com/rubygems/rubygems/commit/7be5b40ca9
2023-12-12 10:04:57 +09:00
David Rodríguez a06bf001b2
[rubygems/rubygems] Remove non-transparent requirement added to prerelease gems
I think we can safely assume these days that all RubyGems and Bundler
versions that will ever bundle a new gem created in 2023 support
prereleases.

So this non transparent requirement is not necessary.

In my opinion, it should be the gem author to explicitly add this
constraint, not RubyGems.

https://github.com/rubygems/rubygems/commit/b165e6d725
2023-12-12 10:04:57 +09:00
Vít Ondruch b37288c047
[rubygems/rubygems] Make the "auto-user-install" logic easier to follow
https://github.com/rubygems/rubygems/commit/4b4d9c0106
2023-12-12 10:04:56 +09:00
David Rodríguez c032dfb5cb
[rubygems/rubygems] Fix installing from source when same bundler version already a default gem
https://github.com/rubygems/rubygems/commit/620119308e
2023-12-12 10:04:56 +09:00
David Rodríguez 23289ad45b
[rubygems/rubygems] Extract some common strings to variables
https://github.com/rubygems/rubygems/commit/48bc573310
2023-12-12 10:04:56 +09:00
David Rodríguez a811ebf3d5
[rubygems/rubygems] Revert missing extensions patch
https://github.com/rubygems/rubygems/commit/4016c6c024
2023-12-12 10:04:56 +09:00
Nobuyoshi Nakada 38348502b5
[DOC] Update description about shared library suffix
Loading an extension library with ".dll" suffix on Windows was very
old behavior, and the suffix must be ".so" since 2004.  See commits
removing DLEXT2 181a3a2af5 and
b76ad15ed0.

Instead, use macOS as an example, which uses ".bundle".
2023-12-12 09:39:13 +09:00
Alan Wu 4eca329d29 Skip a YJIT test on RJIT 2023-12-11 19:21:08 -05:00
Alan Wu 9cb0ad863c YJIT: Fix missing arity check for splat calls to methods with optionals
Previously, for splat callsites that land in methods with optional
parameters, we didn't reject the case where the caller supplies too many
arguments. Accepting those calls previously caused YJIT to construct
corrupted control frames, which leads to crashes if the callee uses
certain stack walking methods such as Kernel#raise and String#gsub (for
setting up the frame-local `$~`).

Example crash in a debug build:

    Assertion Failed: ../vm_core.h:1375:VM_ENV_FLAGS:FIXNUM_P(flags)
2023-12-11 19:21:08 -05:00
Alan Wu 4755309474 YJIT: Rename helper function and correct counter name
Counter::guard_send_iseq_has_rest_and_splat_not_equal was using
jump-if-lesser-than, so wasn't checking for equality. Rename function
because moving is destructive in Rust, which is confusing for this function
which doesn't modify the array.
2023-12-11 19:21:08 -05:00
Kazuhiro NISHIYAMA 9765ada69c Fix NoMethodError on fail
```
.../tool/lib/colorize.rb:56:in `resolve_color': undefined method `gsub' for an instance of Symbol (NoMethodError)

    color.gsub(/\b[a-z][\w ]+/) do |n|
	 ^^^^^
	from .../tool/lib/colorize.rb:47:in `decorate'
	from .../tool/lib/test/unit.rb:1012:in `block in failed'
```
2023-12-12 09:14:11 +09:00
Samuel Giddins 505715ddf1 [rubygems/rubygems] Fewer allocations in gem installation
For now, on a small rails app I have hanging around:

```
==> memprof.after.txt <==
Total allocated: 872.51 MB (465330 objects)
Total retained:  40.48 kB (326 objects)

==> memprof.before.txt <==
Total allocated: 890.79 MB (1494026 objects)
Total retained:  40.40 kB (328 objects)
```

Not a huge difference in memory usage, but it's a drastic improvement
in total number of allocations.

Additionally, this will pay huge dividends once
https://github.com/ruby/zlib/pull/61 is merged, as it will allow us to
completely avoid allocations in the repeated calls to readpartial,
which currently accounts for most of the memory usage shown above.

https://github.com/rubygems/rubygems/commit/f78d45d927
2023-12-11 23:14:58 +00:00
hogelog 4a94ce8569
[DOC] Fix RDoc to match actual Kenrel.require behavior (#9180) 2023-12-12 07:13:54 +09:00
Jemma Issroff 69d60cc67b [PRISM] Properly compile MultiTargetNodes within parameters
If there are MultiTargetNodes within parameters, we need to
iterate over them and compile them individually correctly, once
the locals are all in the correct spaces. We need to add one
getlocal for the hidden variable, and then can recurse into the
MultiTargetNodes themselves
2023-12-11 17:04:46 -05:00
Jemma Issroff 5c8e1911ca [PRISM] Fixed rest in MultiTargetNodes 2023-12-11 17:04:46 -05:00
Jemma Issroff aaeccc2924 [PRISM] Correctly implemented forwarding parameters in methods 2023-12-11 17:04:46 -05:00
Jemma Issroff 85ad5be9ee [PRISM] Restructure parameters on ScopeNodes
This commit completely restructures how we handle parameters. The
motivation for this commit was the fix compilation of MultiTargetNodes
within parameters, including nested MultiTargetNodes. A subsequent
commit will actually do the compilation for the MultiTargetNodes.

This commit's main accomplishment is restructuring the locals table
and how we account for it on the ScopeNode, specifically with regards
to hidden variables.

It has multiple steps, all commented within the code, to calculate
the locals table correctly and compile the parameters:
- Step 1: Caculate the table size for the locals
- Step 2: Populate iv index table and local table
- Step 3: Fill in parameter names of MultiTargetNodes on local table
- Step 4: Fill in method body locals on local table
- Step 5: Compile any locals
2023-12-11 17:04:46 -05:00
Burdette Lamar e1d995a96c
[DOC] Complex doc (#9185) 2023-12-11 15:38:16 -05:00
Koichi Sasada 687d29f93c try modified tests.
debug.gem 1.9.0 has a test issue so try modified one.
ref: d4feeae32b
2023-12-12 02:59:10 +09:00
Jemma Issroff fb93535070 [PRISM] Define and use a pm_add_ensure_iseq
Prior to this commit, we were using `add_ensure_iseq` which compiled
a node as if it was a CRuby node. This commit defines
`pm_add_ensure_iseq` which compiles the Prism node appropriately.
2023-12-11 12:53:47 -05:00
Maxime Chevalier-Boisvert 3f25c08fa5
YJIT: implement call fuzzer script (#9129)
* YJIT: implement call fuzzer script

Attempt to detect bugs in YJIT call implementation.

* Add basic checks for rest, kwrest. Impprove formatting.

* Refactor call fuzzer to make it more powerful and maintainable

Compute checksum of arguments

* Fix checksum computation. Add useless locals as sussged by Alan.

* Add some useless if statements

* Add arguments of different types

* Pass object arguments as well. Force different shapes.

* Compute fuzzing time/speed

* Make use of block param
2023-12-11 12:52:47 -05:00
Kevin Newton 4095e7d2be [ruby/prism] Regexp terminator escapes
https://github.com/ruby/prism/commit/42a48a2ba9
2023-12-11 16:34:55 +00:00
Kevin Newton c65de63913 [ruby/prism] Handle a non-interpolated dsym spanning a heredoc
https://github.com/ruby/prism/commit/b23136ebfd
2023-12-11 16:34:41 +00:00
Kevin Newton 261e8f28a0 [ruby/prism] Correct escapes when ctrl+meta+escape
https://github.com/ruby/prism/commit/ee68b17c01
2023-12-11 16:34:27 +00:00
Martin Emde e186cebe42 [rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTuple
https://github.com/rubygems/rubygems/commit/f63ce682d2
2023-12-11 15:40:08 +00:00
Kevin Newton b673b5b432 [ruby/prism] Split up CallNode in target position
In this commit we're splitting up the call nodes that were in target
positions (that is, for loop indices, rescue error captures, and
multi assign targets).

Previously, we would simply leave the call nodes in place. This had
the benefit of keeping the AST relatively simple, but had the
downside of not being very explicit. If a static analysis tool wanted
to only look at call nodes, it could easily be confused because the
method would have 1 fewer argument than it would actually be called
with.

This also brings some consistency to the AST. All of the nodes in
a target position are now *TargetNode nodes. These should all be
treated the same, and the call nodes can now be treated the same.

Finally, there is benefit to memory. Because being in a target
position ensures we don't have some fields, we can strip down the
number of fields on these nodes.

So this commit introduces two new nodes: CallTargetNode and
IndexTargetNode. For CallTargetNode we get to drop the opening_loc,
closing_loc, arguments, and block. Those can never be present. We
also get to mark their fields as non-null, so they will always be
seen as present.

The IndexTargetNode keeps around most of its fields but gets to
drop both the name (because it will always be []=) and the
message_loc (which was always super confusing because it included
the arguments by virtue of being inside the []).

Overall, this adds complexity to the AST at the expense of memory
savings and explicitness. I believe this tradeoff is worth it in
this case, especially because these are very much not common nodes
in the first place.

https://github.com/ruby/prism/commit/3ef71cdb45
2023-12-11 15:32:31 +00:00
Jemma Issroff c69d1367a7 [PRISM] Fix ElseNode within CaseNode
The logic within the consequent for the CaseNodes in popped cases
was incorrect as it wouldn't emit consequent instructions for a
popped CaseNode. This commit fixes that.
2023-12-11 09:47:59 -05:00
Ufuk Kayserilioglu 0562c246eb Add handling of implicit hash arguments
Arguments that are passed as a hash need special consideration since in certain case they are not treated as keyword arguments. For example, if a call is passing `"a" => 1` as an argument, this will be turned into an implicit hash argument and not a keyword argument.

The existing compiler checks to see if all hash nodes can be treated as keyword arguments. If they can, then it will treat them as keyword arguments. If not, then it will treat them as implicit hash arguments.

This commit implements the same logic inside the Prism compiler.
2023-12-11 09:47:33 -05:00
TSUYUSATO Kitsune 48cb70fee9 [ruby/prism] Fix parsing unterminated empty string `"`
Fix https://github.com/ruby/prism/pull/2034

https://github.com/ruby/prism/commit/8280e577fa
2023-12-11 13:36:37 +00:00
TSUYUSATO Kitsune a860e3605c [ruby/prism] Fix to parse a (endless-)range with binary operators
Fix https://github.com/ruby/prism/pull/2022
Fix https://github.com/ruby/prism/pull/2030

https://github.com/ruby/prism/commit/b78d8b6525
2023-12-11 13:34:48 +00:00
Daisuke Aritomo 1ab91b12fa [rubygems/rubygems] Stream output from ext builds when --verbose
Uses Open3.popen2e in place of Open3.capture2e in Gem::Ext::Builder.
This change aims to stream stdout/stderr of ext builds when in verbose
mode, instead of printing everything at once when the build completes.

Nice for debugging gem builds that consumes longer times.

https://github.com/rubygems/rubygems/commit/dcdcb5adda
2023-12-11 11:07:36 +00:00
Nobuyoshi Nakada 655aacc43a Use dedicated functions to check terminators 2023-12-11 16:51:46 +09:00
git 980255cb7b Update bundled gems list as of 2023-12-10 2023-12-11 06:58:43 +00:00
Hsing-Hui Hsu e5e53ee173 docs(compar.c): change class name in example 2023-12-11 08:56:37 +09:00