summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-04[ruby/syntax_suggest] Bump minimum Ruby version & update standardrbSchneems
https://github.com/ruby/syntax_suggest/commit/73753518e9
2023-12-04[ruby/syntax_suggest] Update standardrb to Ruby 3.0 standardsSchneems
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
2023-12-04[PRISM] Fixed redo nodeJemma Issroff
2023-12-04[PRISM] Handle percent literals for `defined?`eileencodes
Tests all the possible percent literal with `defined?`. Implements the missing `PM_X_STRING_NODE` for the `%x` literal. Code: ```ruby defined?(%x[1,2,3]) ``` ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave ```
2023-12-04[PRISM] Implement `PM_INTERPOLATED_REGULAR_EXPRESSION_NODE`eileencodes
Implements `PM_INTERPOLATED_REGULAR_EXPRESSION_NODE` for `defined?` Code: ```ruby defined?(/#{1}/) ``` ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave ```
2023-12-04[PRISM] Implement `PM_INTERPOLATED_STRING_NODE`eileencodes
Implements `PM_INTERPOLATED_STRING_NODE` for `defined?` Code: ```ruby defined?("#{expr}") ``` ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave ```
2023-12-04[PRISM] Fix `PM_PARENTHESES_NODE`eileencodes
In #9101 I only accounted for an empty paren. This change implements the `PM_PARENTHESES_NODE` for when it's `nil` and when it's an expression. Code: ```ruby defined?(("a")) ``` ``` "********* Ruby *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,15)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,15)> 0000 putobject "expression" 0002 leave ```
2023-12-04[Prism] Implement backref and numbered reference for `defined?`eileencodes
This PR implements `PM_BACK_REFERENCE_READ_NODE` and `PM_NUMBERED_REFERENCE_READ_NODE` for `defined?`. The following now works: * `PM_NUMBERED_REFERENCE_READ_NODE` ``` defined? $1 defined? $2 ``` Instructions: ``` "********* RUBY *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$1, "global-variable" 0005 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$1, "global-variable" 0005 leave ``` * `PM_BACK_REFERENCE_READ_NODE` ``` defined? $' defined? $` defined? $& ``` Instructions: ``` "********* RUBY *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$`, "global-variable" 0005 leave "********* PRISM *************" == disasm: #<ISeq:<compiled>@<compiled>:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$`, "global-variable" 0005 leave ```
2023-12-04[PRISM] Fix compilation for NextNodeJemma Issroff
This code was almost enitrely the same as the existing compiler's code for its NextNode.
2023-12-04Use 32-bit integers for redblack_id_tPeter Zhu
On 32-bit systems, the shape cache size is 1048576 (value of REDBLACK_CACHE_SIZE), but a 16-bit unsigned integer can only go up to 65536. This means that the redblack_id_t can overflow and lead to a corrupted red-black tree. The following script crashes on 32-bit systems: o = Object.new 1_000_000.times do |i| o.instance_variable_set(:"@i#{i}", i) end
2023-12-04[ruby/prism] Fix up docs for lex_compatKevin Newton
https://github.com/ruby/prism/commit/9131e84060
2023-12-04[ruby/prism] Ripper compat docs updateKevin Newton
https://github.com/ruby/prism/commit/5f70b32b02
2023-12-04[PRISM] Fix dependenciesPeter Zhu
2023-12-04YJIT: Mark and update stubs in invalidated blocks (#9104)Alan Wu
Like in the example given in delayed_deallocation(), stubs can be hit even if the block housing it is invalidated. Mark them so we don't work with invalidate ISeqs when hitting these stubs.
2023-12-04Make rb_obj_copy_ivs_to_hash_table_i staticPeter Zhu
2023-12-04[ruby/prism] Refactor pm_diagnostic_t and pm_comment_t to use pm_location_tLily Lyons
https://github.com/ruby/prism/commit/115b6a2fc6
2023-12-04[ruby/prism] Check "void value expression" for array literalsTSUYUSATO Kitsune
Fix https://github.com/ruby/prism/pull/1978 https://github.com/ruby/prism/commit/194c997d0a
2023-12-03Revert "Add missing GVL hooks for M:N threads and ractors"John Hawthorn
This reverts commit ad54fbf281ca1935e79f4df1460b0106ba76761e.
2023-12-04Fix format specifiers for `size_t`Nobuyoshi Nakada
2023-12-04Remove `rb_libruby_selfpath` for MJITNobuyoshi Nakada
2023-12-04Win32: ruby-runner is unnecessary on Windows in favor of SxS [ci skip]Nobuyoshi Nakada
2023-12-03Update default gems list at 52eabf2e329485088672beefe4bc59 [ci skip]git
2023-12-03[ruby/irb] Bump version to v1.10.0Stan Lo
(https://github.com/ruby/irb/pull/798) https://github.com/ruby/irb/commit/4acc9b8d6c
2023-12-03[ruby/irb] Disable pager in eval_history testtomoya ishida
(https://github.com/ruby/irb/pull/799) https://github.com/ruby/irb/commit/ee85e84935
2023-12-02[Fix] Support when nil is assigned to variable `name` (#9105)jinroq
* Add `!name.nil?` to if condition
2023-12-02Add missing GVL hooks for M:N threads and ractorsJohn Hawthorn
[Bug #20019] This fixes GVL instrumentation in three locations it was missing: - Suspending when blocking on a Ractor - Suspending when doing a coroutine transfer from an M:N thread - Resuming after an M:N thread starts Co-authored-by: Matthew Draper <matthew@trebex.net>
2023-12-02[DOC] More on What's Here (#9099)Burdette Lamar
* More on What's Here * More on What's Here
2023-12-02Pin instruction storagePeter Zhu
The operands in each instruction needs to be pinned because if auto-compaction runs in iseq_set_sequence, then the objects could exist on the generated_iseq buffer, which would not be reference updated which can lead to T_MOVED (and subsequently T_NONE) objects on the iseq.
2023-12-02[DOC] Markup class name `Time` as codeNobuyoshi Nakada
2023-12-02[DOC] Include timezones document in timev.rbNobuyoshi Nakada
So that it can be referred as a part of the document of `Time`.
2023-12-02[ruby/rdoc] Markup punctuations need to be separated with a spaceNobuyoshi Nakada
https://github.com/ruby/rdoc/commit/83f0149fc1
2023-12-02[ruby/irb] Implement `history` commandGary Tou
(https://github.com/ruby/irb/pull/761) * Implement `history` command Lists IRB input history with indices. Also aliased as `hist`. * Add tests for `history` command * Address feedback: `puts` with multiple arguments instead of `join`ing * Address feedback: Handle nil from splitting an empty input string * Refactor line truncation * Add `-g` grep option to `history` command * Add `history` command to README * Remove unused `*args` parameter * Allow spaces to be included in grep * Allow `/` to be included in grep regex * Handle `input` being an empty string * Exclude "#{index}: " from matching the grep regex * Add new line after joining https://github.com/ruby/irb/commit/3f9eacbfa9
2023-12-02Lrama v0.5.11yui-knk
2023-12-01Implement paren node for `defined?`eileencodes
Implements and adds a test for passing a parentheses node to `defined?`.
2023-12-01[DOC] Update ARGF.readlines documentation to match/reference IO.readlines.Ryan Davis
2023-12-01Make expandarray compaction safePeter Zhu
The expandarray instruction can allocate an array, which can trigger a GC compaction. However, since it does not increment the sp until the end of the instruction, the objects it places on the stack are not marked or reference updated by the GC, which can cause the objects to move which leaves broken or incorrect objects on the stack. This commit changes the instruction to be handles_sp so the sp is incremented inside of the instruction right after the object is written on the stack.
2023-12-01[ruby/prism] Prism.parse_success?(source)Kevin Newton
A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine if a source is valid. These tools both create an AST instead of providing an API that will return a boolean only. This new API only creates the C structs, but doesn't bother reifying them into Ruby/the serialization API. Instead it only returns true/false, which is significantly more efficient. https://github.com/ruby/prism/commit/7014740118
2023-12-01Remove unneeded local variablesPeter Zhu
2023-12-01[ruby/prism] Fix parsing heredoc endsHaldun Bayhantopcu
https://github.com/ruby/prism/commit/aa8c702271
2023-12-01Implements missing literals for `defined?`eileencodes
This PR implements the following literals: - String - Symbols - Integers - Floats - Regexs - Ranges - Lambdas - Hashes and tests for them.
2023-12-01Make String#undump compaction safePeter Zhu
2023-12-01Pin embedded shared stringsPeter Zhu
Embedded shared strings cannot be moved because strings point into the slot of the shared string. There may be code using the RSTRING_PTR on the stack, which would pin the string but not pin the shared string, causing it to move.
2023-12-01[rubygems/rubygems] Reduce array allocations when loading definitionSamuel Giddins
The same array was being re-created in a loop (as well as the `generic_local_platform`), which is avoidable by hoisting it to a frozen array created once https://github.com/rubygems/rubygems/commit/009a3c6d0d
2023-12-02[Bug #20033] Dynamic regexp should not assign capturesNobuyoshi Nakada
2023-12-01[ruby/prism] Provide heredoc? queriesKevin Newton
https://github.com/ruby/prism/commit/e148e8fe6a
2023-12-01[PRISM] Account for RescueNodes with no statementsJemma Issroff
We need a PUTNIL if a RescueNode has no statements.
2023-12-01[PRISM] Fix behavior of BlockParameters with only one parameterJemma Issroff
This commit sets the ambiguous param flag if there is only one parameter on a block node. It also fixes a small bug with a trailing comma on params.
2023-12-01[ruby/irb] Scrub past history input before splithogelog
(https://github.com/ruby/irb/pull/795) * Scrub past history input before split * Don't rewrite ENV["LANG"] https://github.com/ruby/irb/commit/0f344f66d9
2023-12-01[rubygems/rubygems] Many major_deprecations supply :removed_messageEric Mueller
Generally the removed message is very similar, but often it needs to specify that the feature has "been removed" instead of "will be removed", or "been deprecated". And a few chunks of text needed more substantial updates. And a number of them seemed to have been carefully crafted to make sense in either context, so I left those alone. https://github.com/rubygems/rubygems/commit/8d42cf9104
2023-12-01[rubygems/rubygems] major_deprecation accepts :removed_messageEric Mueller
If supplied, it uses that in place of the message for the case where the deprecation version is already past. https://github.com/rubygems/rubygems/commit/1deb73663c