Skip to content

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

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

Merged
merged 4 commits into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rvm:
- 2.1
- 2.2
- 2.3.0
- 2.4.1
- jruby-18mode
- jruby-19mode
- jruby-9.0.5.0
Expand All @@ -16,6 +17,9 @@ gemfile: ".travis/Gemfile"

sudo: false

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

env:
global:
- VERBOSE=true
Expand Down
6 changes: 6 additions & 0 deletions .travis/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ when "synchrony"
gem "hiredis"
gem "em-synchrony"
end

if RUBY_VERSION.to_f < 1.9
gem 'test-unit', '3.1.5'
else
gem 'test-unit', '>= 3.2.5'
end
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
source 'https://rubygems.org'

gemspec

if RUBY_VERSION.to_f < 1.9
gem 'test-unit', '3.1.5'
else
gem 'test-unit', '>= 3.2.5'
end
2 changes: 1 addition & 1 deletion lib/redis/connection/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize(*args)
super(*args)

@timeout = @write_timeout = nil
@buffer = ""
@buffer = "".dup
end

def timeout=(timeout)
Expand Down
2 changes: 1 addition & 1 deletion redis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }

s.add_development_dependency("rake", "<11.0.0")
s.add_development_dependency("test-unit", "3.1.5")
s.add_development_dependency("test-unit", ">= 3.1.5")
end