summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-12[rubygems/rubygems] Refactor: Wrap filesystem accessFranz Liedke
https://github.com/rubygems/rubygems/commit/119d4bdc09
2023-12-12[rubygems/rubygems] Refactor: Move filesystem access into Definition classFranz Liedke
https://github.com/rubygems/rubygems/commit/2720da2659
2023-12-12[rubygems/rubygems] bundle lock: Always touch the lockfileFranz Liedke
https://github.com/rubygems/rubygems/commit/fd2e71dfdb
2023-12-12Unlock tilt since we no longer support Ruby 2.6David Rodríguez
2023-12-12[rubygems/rubygems] Remove doc not adding much valueDavid Rodríguez
https://github.com/rubygems/rubygems/commit/c241a88962
2023-12-12[rubygems/rubygems] Make tests compatible with paths that contain a + charMartin Emde
https://github.com/rubygems/rubygems/commit/3355c80c90
2023-12-12[rubygems/rubygems] Use StringIO 3.1.0 in tests to work with ruby 3.3.0Martin Emde
https://github.com/rubygems/rubygems/commit/8a936d733d
2023-12-12[rubygems/rubygems] Improve enabling bundled gems warningsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/7be5b40ca9
2023-12-12[rubygems/rubygems] Remove non-transparent requirement added to prerelease gemsDavid Rodríguez
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[rubygems/rubygems] Make the "auto-user-install" logic easier to followVít Ondruch
https://github.com/rubygems/rubygems/commit/4b4d9c0106
2023-12-12[rubygems/rubygems] Fix installing from source when same bundler version ↵David Rodríguez
already a default gem https://github.com/rubygems/rubygems/commit/620119308e
2023-12-12[rubygems/rubygems] Extract some common strings to variablesDavid Rodríguez
https://github.com/rubygems/rubygems/commit/48bc573310
2023-12-12[rubygems/rubygems] Revert missing extensions patchDavid Rodríguez
https://github.com/rubygems/rubygems/commit/4016c6c024
2023-12-12[DOC] Update description about shared library suffixNobuyoshi Nakada
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 181a3a2af5df88d145b73a060d51fe437c8c4ad4 and b76ad15ed0da636161de0243c547ee1e6fc95681. Instead, use macOS as an example, which uses ".bundle".
2023-12-11Skip a YJIT test on RJITAlan Wu
2023-12-11YJIT: Fix missing arity check for splat calls to methods with optionalsAlan Wu
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-11YJIT: Rename helper function and correct counter nameAlan Wu
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-12Fix NoMethodError on failKazuhiro NISHIYAMA
``` .../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-11[rubygems/rubygems] Fewer allocations in gem installationSamuel Giddins
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-12[DOC] Fix RDoc to match actual Kenrel.require behavior (#9180)hogelog
2023-12-11[PRISM] Properly compile MultiTargetNodes within parametersJemma Issroff
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[PRISM] Fixed rest in MultiTargetNodesJemma Issroff
2023-12-11[PRISM] Correctly implemented forwarding parameters in methodsJemma Issroff
2023-12-11[PRISM] Restructure parameters on ScopeNodesJemma Issroff
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[DOC] Complex doc (#9185)Burdette Lamar
2023-12-12try modified tests.Koichi Sasada
debug.gem 1.9.0 has a test issue so try modified one. ref: https://github.com/ruby/debug/commit/d4feeae32b69b4f88c94fecfc7a283b475eec4de
2023-12-11[PRISM] Define and use a pm_add_ensure_iseqJemma Issroff
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-11YJIT: implement call fuzzer script (#9129)Maxime Chevalier-Boisvert
* 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[ruby/prism] Regexp terminator escapesKevin Newton
https://github.com/ruby/prism/commit/42a48a2ba9
2023-12-11[ruby/prism] Handle a non-interpolated dsym spanning a heredocKevin Newton
https://github.com/ruby/prism/commit/b23136ebfd
2023-12-11[ruby/prism] Correct escapes when ctrl+meta+escapeKevin Newton
https://github.com/ruby/prism/commit/ee68b17c01
2023-12-11[rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTupleMartin Emde
https://github.com/rubygems/rubygems/commit/f63ce682d2
2023-12-11[ruby/prism] Split up CallNode in target positionKevin Newton
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[PRISM] Fix ElseNode within CaseNodeJemma Issroff
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-11Add handling of implicit hash argumentsUfuk Kayserilioglu
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[ruby/prism] Fix parsing unterminated empty string `"`TSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/2034 https://github.com/ruby/prism/commit/8280e577fa
2023-12-11[ruby/prism] Fix to parse a (endless-)range with binary operatorsTSUYUSATO Kitsune
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[rubygems/rubygems] Stream output from ext builds when --verboseDaisuke Aritomo
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-11Use dedicated functions to check terminatorsNobuyoshi Nakada
2023-12-11Update bundled gems list as of 2023-12-10git
2023-12-11docs(compar.c): change class name in exampleHsing-Hui Hsu
2023-12-10[DOC] RDoc for Complex (#9181)Burdette Lamar
2023-12-10Add bright colors and multiple attributes [ci skip]Nobuyoshi Nakada
Not only: ``` $ ruby colorize.rb fail foo ``` Also: ``` $ ruby colorize.rb 'bright_blue;bold' foo ```
2023-12-10Extract configuration and lookup methods [ci skip]Nobuyoshi Nakada
2023-12-10add `flags` to `rb_postponed_job_preregister`Koichi Sasada
for future extensions.
2023-12-10Change the semantics of rb_postponed_job_registerKJ Tsanaktsidis
Our current implementation of rb_postponed_job_register suffers from some safety issues that can lead to interpreter crashes (see bug #1991). Essentially, the issue is that jobs can be called with the wrong arguments. We made two attempts to fix this whilst keeping the promised semantics, but: * The first one involved masking/unmasking when flushing jobs, which was believed to be too expensive * The second one involved a lock-free, multi-producer, single-consumer ringbuffer, which was too complex The critical insight behind this third solution is that essentially the only user of these APIs are a) internal, or b) profiling gems. For a), none of the usages actually require variable data; they will work just fine with the preregistration interface. For b), generally profiling gems only call a single callback with a single piece of data (which is actually usually just zero) for the life of the program. The ringbuffer is complex because it needs to support multi-word inserts of job & data (which can't be atomic); but nobody actually even needs that functionality, really. So, this comit: * Introduces a pre-registration API for jobs, with a GVL-requiring rb_postponed_job_prereigster, which returns a handle which can be used with an async-signal-safe rb_postponed_job_trigger. * Deprecates rb_postponed_job_register (and re-implements it on top of the preregister function for compatability) * Moves all the internal usages of postponed job register pre-registration
2023-12-10Add RUBY_ATOMIC_{PTR_,}FETCH macros for atomic loadsKJ Tsanaktsidis
This can already be emulated by doing an atomic fetch_add of zero, but this is more explicit. [Bug #19994]
2023-12-10Move `DOT_WAIT` before including Makefile that is using it [ci skip]Nobuyoshi Nakada
2023-12-10[ruby/irb] Simplify show_source's super calculationStan Lo
(https://github.com/ruby/irb/pull/807) https://github.com/ruby/irb/commit/2cccc448de
2023-12-10[ruby/prism] fix: escape newlineAlex Koval
https://github.com/ruby/prism/commit/a28b427dcc