[Ruby FFI] Map#merge always raises when merging Hash or Map values
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start at the Ruby FFI implementation of Google::Protobuf::Map#merge and inspect its private helper calls, especially descriptor and internal_merge_into_self. Use the isolated source-built FFI model to verify Hash and compatible Map merges, result independence, and unchanged inputs, then confirm the reported source-built and native suite results.
Written by the indexing model from the issue text.
Description
Summary
The FFI implementation of Google::Protobuf::Map#merge calls private helpers with explicit receivers. Ruby rejects both calls: Map input reaches other.descriptor, and all accepted inputs reach internal_dup.internal_merge_into_self, producing NoMethodError instead of a merged copy.
Proposed correction
Use the existing private reflective access consistently for descriptor and internal_merge_into_self. Candidate: 00c482150dab1ad152135ab860632c8ae2a11c26 on current main (5b1c20741838b8359193b97895cb0ff35b4ecf79).
The isolated source-built FFI model covers Hash and compatible Map merges, result independence, and unchanged inputs. The cumulative source-built FFI suite passes 329 tests /598,403 assertions with no failures/errors and nine documented omissions; native passes 332 /556,948 with three omissions.
I used an AI coding assistant during source review and verification. I am opening an issue first because CONTRIBUTING asks for tests and maintainer agreement; this dependency audit is not permitted to modify repository tests and no CLA was signed as part of it.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 136
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from protocolbuffers/protobuf
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
protocolbuffers/protobuf#29896 ·
-
MODULE.bazel: crate_universe usage without a lockfile breaks every `bazel mod` command for consumers Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
protocolbuffers/protobuf#29866 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
protocolbuffers/protobuf#29672 ·
-
feature request untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
protocolbuffers/protobuf#29528 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
protocolbuffers/protobuf#29519 ·
All issues in protocolbuffers/protobuf
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·