diff options
| author | Mark Longair <mhl@pobox.com> | 2013-11-22 13:27:15 +0000 |
|---|---|---|
| committer | Henare Degan <henare.degan@gmail.com> | 2013-11-22 16:39:44 -0200 |
| commit | ea8b8e7cdae9d2a2596df0a643ea4921e17b628f (patch) | |
| tree | 41de025c3a4ea3b6f18ac510b4b7bc4f5425e390 /Gemfile | |
| parent | 3b86cb6129140fc123dc3aeffcccdb5652f19085 (diff) | |
Fix quietly_try_to_purge on Ruby 2.0
The tests of quietly_try_to_purge were failing on Ruby 2.0 due to the
net-http-local gem not working with that Ruby version. When
Net::HTTP::bind is called, it temporarily replaces the open method of
TCPSocket with a version of open that only takes two parameters. The
Ruby 1.9 version of net/http.rb calls TCPSocket.open with two
parameters, but the Ruby 2.0 version calls it with 4, and so fails with
a mismatched number of arguments error.
In fact, net-http-local doesn't seem to be necessary with Ruby 2.0,
where one can supply a :local_port argument to Net::HTTP.start, so this
commit patches lib/quiet_opener.rb to use that approach with Ruby
>= 2.0, and net-http-local on earlier versions.
Diffstat (limited to 'Gemfile')
| -rw-r--r-- | Gemfile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -20,7 +20,7 @@ gem 'fastercsv', '>=1.5.5' gem 'jquery-rails', '~> 2.1' gem 'json' gem 'mahoro' -gem 'net-http-local' +gem 'net-http-local', :platforms => [:ruby_18, :ruby_19] gem 'net-purge' gem 'newrelic_rpm' gem 'rack' |
