aboutsummaryrefslogtreecommitdiffstats
path: root/lib/activesupport_cache_extensions.rb
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2013-11-22 13:27:15 +0000
committerHenare Degan <henare.degan@gmail.com>2013-11-22 16:39:44 -0200
commitea8b8e7cdae9d2a2596df0a643ea4921e17b628f (patch)
tree41de025c3a4ea3b6f18ac510b4b7bc4f5425e390 /lib/activesupport_cache_extensions.rb
parent3b86cb6129140fc123dc3aeffcccdb5652f19085 (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 'lib/activesupport_cache_extensions.rb')
0 files changed, 0 insertions, 0 deletions