Remove unnecessary check on version #433
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had a look at the warnings being fixed in #390 to try to come up with a better solution.
Initially, I was able to reproduce the issue by running
bundle
from the root of this repo. The issue happened because my jruby installation had apsych
installation at:~/.rbenv/versions/jruby-9.2.9.0/lib/ruby/gems/shared/gems
, and that specific installation did not have the version guard inversions.rb
that this repository included. So, when runningbundle
first the local gemspec would be loaded which loads the versions.rb file in the repository relatively, thenbundler
would load the "system" version of psych without the version guard, causing the redefinition warnings.The changes in this PR fix the issue because the local version of
psych
is always loaded.However, I cannot reproduce on a pristine installation of jruby, because
psych
is not included in the~/.rbenv/versions/jruby-9.2.9.0/lib/ruby/gems/shared/gems
, so now I'm not sure how to reproduce this anymore... :/