Skip to content

[pull] master from ruby:master - #1255

Merged
pull[bot] merged 5 commits into
turkdevops:masterfrom
ruby:master
Jul 28, 2026
Merged

[pull] master from ruby:master#1255
pull[bot] merged 5 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Jul 28, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

shugo and others added 5 commits July 28, 2026 10:19
parse_expression_terminator runs after every infix operator and called
pm_block_call_p, which walks the whole receiver chain, even when the
binding power alone already decided the result. Check the binding power
first; pm_block_call_p is pure, so the condition is unchanged.

Parsing "a" followed by 8000 ".b" links drops from 44.8ms to 0.46ms.

ruby/prism@8a40a928a8

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… parser translator

There's some special handling in regards to empty symbols and those containing newlines
that should apply here. Makes it produce the correct amount of sym/dsym nodes

ruby/prism@8b567cc403
The example shows the result as `+4`, but the operation returns a buffer of
the same size as the source, which is 10 bytes here:

    $ ruby -e 'p((IO::Buffer.for("1234567890") & IO::Buffer.for("\xFF\x00\x00\xFF")).size)'
    10

The rest of the example is already correct. The hex dump and the ASCII column
show all 10 bytes, and the description right above says "Generate a new buffer
the same size as the source", so the example contradicts both. The size of the
mask is 4, which is likely where the number came from.

The neighbouring examples for #|, #^ and #~ all show `+10` and need no change.
…18089)

The call-seq of IO::Buffer#<=> says it returns "true or false", but
rb_io_buffer_compare always returns an integer: -1 or 1 when the sizes
differ, and the result of memcmp as is when the sizes are equal. Since
the value comes straight from memcmp it is not normalized to -1, 0 or 1,
so only its sign is meaningful.

    p(IO::Buffer.for("abc") <=> IO::Buffer.for("abc")) # => 0
    p(IO::Buffer.for("abc") <=> IO::Buffer.for("ab"))  # => 1
    p(IO::Buffer.for("abc") <=> IO::Buffer.for("abz")) # => -23

IO::Buffer#hexdump returns nil when the buffer does not reference any
memory, that is, when #null? returns true, but this was not documented.

    buffer = IO::Buffer.new(4)
    buffer.free
    p buffer.hexdump # => nil
@pull pull Bot locked and limited conversation to collaborators Jul 28, 2026
@pull pull Bot added the ⤵️ pull label Jul 28, 2026
@pull
pull Bot merged commit 9b76442 into turkdevops:master Jul 28, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants