Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfreeze SimpleCov::VERSION #461

Merged
merged 2 commits into from
Feb 10, 2016
Merged

Conversation

leafle
Copy link
Contributor

@leafle leafle commented Feb 10, 2016

Older versions of rubygems choke on an immutable version string.

I wasn't able to actually get rubocop to complain about the mutable constant so I couldn't verify that the second commit actually does anything.

In older versions of rubygems, in particular 1.8.23, Gem::Version#new
calls .strip! (as opposed to .strip) on the provided version. In some
cases, this constant is passed into that method causing it to raise an
exception ("can't modify frozen String"). This is discussed further
here:

https://github.com/colszowka/simplecov/pull/448/files#r52428872
That constant needs to be mutable to support older rubies.

https://github.com/colszowka/simplecov/pull/448/files#r52428872

This change doesn't appear to be required, rubocop does not complain
with or without it. This makes it pretty hard to verify I'm doing the
right thing.
colszowka added a commit that referenced this pull request Feb 10, 2016
Unfreeze SimpleCov::VERSION
@colszowka colszowka merged commit fd533df into simplecov-ruby:master Feb 10, 2016
colszowka added a commit that referenced this pull request Feb 10, 2016
@colszowka
Copy link
Collaborator

Thanks!

craiglittle pushed a commit to craiglittle/simplecov that referenced this pull request Feb 13, 2016
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 9, 2016
0.12.0 2016-07-02 ([changes](simplecov-ruby/simplecov@v0.11.2...v0.12.0))
=================

## Enhancements

* Add support for JSON versions 2.x

## Bugfixes

* Fix coverage rate of the parallel_tests. See [#441](simplecov-ruby/simplecov#441) (thanks @sinsoku)
* Fix a regression on old rubies that failed to work with the recently introduced frozen VERSION string. See [#461](simplecov-ruby/simplecov#461) (thanks @leafle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants