Skip to content

[pull] master from ruby:master#1132

Merged
pull[bot] merged 13 commits into
turkdevops:masterfrom
ruby:master
Jun 19, 2026
Merged

[pull] master from ruby:master#1132
pull[bot] merged 13 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Jun 19, 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 : )

samyron and others added 13 commits June 19, 2026 07:30
…PENDING as the new JRuby parser successfully parsed those files.

ruby/json@e954a6fe4e
This is intended to make it easier to securely parse untrusted
inputs.

ruby/json@21c2bbea1c
… error

Fix: ruby/json#1022

They can't always be accurate because we don't always keep the
full document in the buffer. As such it's better never to compute
them than to sometimes provide wrong coordinates.

In theory we could keep the number of lines since the start
of the parse, but that's more book keeping for little utility.

Anyway, these are useful to find a syntax error in a file,
not so much in a stream of documents.

ruby/json@b2372115af
…ound or converting to st_table

* While perusing code in hash.c I found it suspicious that ar_find_entry_hint()
  didn't reread bound in the loop and yet called arbitrary code through #eql?.
* ar_find_entry_hint() before this commit would not check if bound or the storage (AR->ST) changed
  and would return a bin index which is not correct to access.
* Check bound in the loop so it's always up-to-date.
* Return RHASH_AR_TABLE_CONVERTED_TO_ST_TABLE when converted to st_table
  and make callers retry the operation as a st_table.

[Bug #22120]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* The macros would expand `ptr` 3 times which could cause extra reads.
* We had reports of many segfaults in this area
  (e.g. DataDog/dd-trace-rb#5718).
  Even though the code before looks correct semantically,
  this makes it definitely OK and much easier to follow,
  by reading fields from the entry only once
  and not touching the entry after #eql? has returned.
  The entry can be a pointer to free'd memory if the table was rebuilt during #eql?.
* Separate functions for st_table and set_table avoid unsafe casts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If `load-relative` is specified, the system uses `dladdr` to locate
the executable file path when initializing the load path; however, on
some platforms (at least OpenBSD), `dladdr` fails under certain
conditions (such as when debug information is missing).  In that case,
the system falls back to using `argv[0]`; however, if this is a
relative path, the executable cannot be found after changing the
working directory with the `-C` option, resulting in an error.
Since the exception will be swallowed, building a message and
backtrace is just a waste of time.

ruby/json@4bd1e9bce6
Somehow on TruffleRuby `rb_catch_obj` straight out doesn't call
the passed function, acting as a noop.

ruby/json@9d8efcb08b
Fix: ruby/json#1016 (comment)

`json` takes option hashes across the board, mostly because its API
predates the introduction of keyword arguments.

I'd like to change that to only take keyword arguments and error
when an unknown argument is passed, but I'm not yet sure of the
backward compatibility consequences, so it might wait for the next
major.

But in the meantime, `ResumableParser` being a new API, it can
safely use keyword arguments.

ruby/json@f08c66338c
@pull pull Bot locked and limited conversation to collaborators Jun 19, 2026
@pull pull Bot added the ⤵️ pull label Jun 19, 2026
@pull pull Bot merged commit a7022d3 into turkdevops:master Jun 19, 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.

6 participants