Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Rust function hello("world") returns "Hello world, from Rust!" but
the Ruby test templates expected "Hello earth, from Rust!", causing
generated tests to fail immediately after bundle gem --ext=rust.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates Bundler’s generated newgem templates and documentation to correct a few typos, primarily around the Rust extension “hello” string and some wording in comments/manpages.
Changes:
- Update Rust newgem template expectations from “Hello earth…” to “Hello world…”.
- Fix typos in an internal comment (
reaed→read,a threads→a thread). - Fix a typo in the
bundle-configmanpage (fetchig→fetching) in both.ronnand generated.1.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
bundler/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt |
Fixes expected Rust greeting string in generated Minitest template. |
bundler/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt |
Fixes expected Rust greeting string in generated RSpec template (also highlights a matcher correctness issue). |
bundler/lib/bundler/source/rubygems.rb |
Fixes typos in a concurrency-related comment near gem installer caching. |
bundler/lib/bundler/man/bundle-config.1.ronn |
Fixes a typo in the api_request_size documentation. |
bundler/lib/bundler/man/bundle-config.1 |
Mirrors the .ronn typo fix in the generated manpage output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| result = <%= config[:constant_name] %>.hello("world") | ||
|
|
||
| expect(result).to be("Hello earth, from Rust!") | ||
| expect(result).to be("Hello world, from Rust!") |
There was a problem hiding this comment.
In this RSpec template, be("Hello world, from Rust!") checks object identity (equal?) and will generally fail for newly-allocated strings. Use a value-equality matcher like eq/eql here so the generated spec passes reliably.
| expect(result).to be("Hello world, from Rust!") | |
| expect(result).to eq("Hello world, from Rust!") |
| # We are using a mutex to reaed and write from/to the hash. | ||
| # We are using a mutex to read and write from/to the hash. | ||
| # The reason this double synchronization was added is for performance | ||
| # and lock the mutex for the shortest possible amount of time. Otherwise, |
There was a problem hiding this comment.
Minor grammar nit in this comment: "is for performance and lock the mutex" reads like a typo; consider changing to "is for performance and to lock the mutex ..." for clarity.
| # and lock the mutex for the shortest possible amount of time. Otherwise, | |
| # and to lock the mutex for the shortest possible amount of time. Otherwise, |
be checks object identity which will fail for newly-allocated strings. eq checks value equality and is the correct matcher here. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Change "and lock the mutex" to "and to lock the mutex" for correct parallel infinitive structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What is your fix for the problem, implemented in this PR?
Fixed typo and incorrectly test assertion words.
Make sure the following tasks are checked