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

Get tests passing with frozen-string-literals enabled. #701

Merged
merged 4 commits into from
Jul 18, 2017

Conversation

pat
Copy link
Contributor

@pat pat commented Jun 21, 2017

This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :)

As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced:

before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT

This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).

@pat
Copy link
Contributor Author

pat commented Jun 25, 2017

For what it's worth, I've added MRI 2.4.1 and the RUBYOPT flag to the test suite, along with the latest release of test-unit, and everything (beyond rbx-2) is green.

@badboy
Copy link
Contributor

badboy commented Jul 15, 2017

Great!

bors r+

not-a-robot bot added a commit that referenced this pull request Jul 15, 2017
701: Get tests passing with frozen-string-literals enabled. r=badboy

This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :)

As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced:

```yml
before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT
```

This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).
@not-a-robot
Copy link

not-a-robot bot commented Jul 17, 2017

Timed out

@badboy
Copy link
Contributor

badboy commented Jul 17, 2017

bors r+

not-a-robot bot added a commit that referenced this pull request Jul 17, 2017
640: Add new master_name param for sentinel. Fixes #531 r=badboy

Associated with issue #531.
Based on #534 with the addition of tests.
Didn't know how to keep @nguyenductung 's commit sadly but this PR does fix the issue and is tested.


701: Get tests passing with frozen-string-literals enabled. r=badboy

This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :)

As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced:

```yml
before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT
```

This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).
@badboy
Copy link
Contributor

badboy commented Jul 17, 2017

bors r+

not-a-robot bot added a commit that referenced this pull request Jul 17, 2017
701: Get tests passing with frozen-string-literals enabled. r=badboy

This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :)

As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced:

```yml
before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT
```

This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).
@badboy
Copy link
Contributor

badboy commented Jul 17, 2017

bors r-

@not-a-robot
Copy link

not-a-robot bot commented Jul 17, 2017

Canceled

@badboy
Copy link
Contributor

badboy commented Jul 17, 2017

bors r+

not-a-robot bot added a commit that referenced this pull request Jul 17, 2017
701: Get tests passing with frozen-string-literals enabled. r=badboy

This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :)

As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced:

```yml
before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT
```

This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).
@not-a-robot
Copy link

not-a-robot bot commented Jul 18, 2017

Timed out

@pat
Copy link
Contributor Author

pat commented Jul 18, 2017

bors really isn't having much luck :(

@badboy
Copy link
Contributor

badboy commented Jul 18, 2017

Yeah, turns out I'm basically a beta tester for bors and discover all the bugs :D

@badboy
Copy link
Contributor

badboy commented Jul 18, 2017

another try
bors r+

not-a-robot bot added a commit that referenced this pull request Jul 18, 2017
701: Get tests passing with frozen-string-literals enabled. r=badboy

This one simple change ensure that all string literals can be frozen (as per the optional feature in MRI 2.3 and onwards). @twalpole has (again) beaten me to such a patch (in #590), though mine (again) does not add the pragma comment to all files. Getting their or my PRs merged in would be excellent :)

As an alternative to the pragma comment, I would recommend adding the following to your .travis.yml file to ensure regressions aren't introduced:

```yml
before_script:
- if (ruby -e "exit RUBY_VERSION.to_f >= 2.4"); then export RUBYOPT="--enable-frozen-string-literal"; fi; echo $RUBYOPT
```

This will add the flag when the tests are run on MRI 2.4 or newer (while the feature was introduced in 2.3, it doesn't seem to work reliably until 2.4). Please note: tests will currently fail when this flag is set unless test-unit is also updated (as noted in test-unit/test-unit#149).
@not-a-robot
Copy link

not-a-robot bot commented Jul 18, 2017

Build succeeded

@not-a-robot not-a-robot bot merged commit 8033911 into redis:master Jul 18, 2017
@badboy
Copy link
Contributor

badboy commented Jul 18, 2017

There you go.

@pat
Copy link
Contributor Author

pat commented Jul 18, 2017

Great, thanks :)

@badboy
Copy link
Contributor

badboy commented Jul 18, 2017

I'll try to get a release out by the end of the week

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