Skip to content

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Jan 10, 2025

What was the end-user or developer problem that led to this PR?

When running bundler specs with ruby 3.4, some strange warnings are printed when running the following spec:

https://github.com/rubygems/rubygems/blob/64e0f98f581a399ed34ba729d2967dc3e4b0a31e/bundler/spec/bundler/bundler_spec.rb#L72-L90

Warnings read like this:

/path/to/rubygems/bundler/tmp/1.1/test.gemspec:1: warning: possibly useless use of -@ in void context

This is because when Bundler fails to load a YAML gemspec, it will retry evaluating it as Ruby code, and that causes the warnings.

What is your fix for the problem, implemented in this PR?

I'd say this fallback is not necessary, so I propose to remove it.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/dont-fallback-to-evaluating-yaml-gemspecs branch from 912997f to a283a5d Compare January 13, 2025 12:24
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review January 13, 2025 12:24
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/dont-fallback-to-evaluating-yaml-gemspecs branch from a283a5d to ca0a7ff Compare January 16, 2025 09:36
@deivid-rodriguez deivid-rodriguez merged commit d02443a into master Jan 16, 2025
91 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/dont-fallback-to-evaluating-yaml-gemspecs branch January 16, 2025 12:40
deivid-rodriguez added a commit that referenced this pull request Jan 16, 2025
…-to-evaluating-yaml-gemspecs

Don't fallback to evaluating YAML gemspecs as Ruby code

(cherry picked from commit d02443a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant