summaryrefslogtreecommitdiff
blob: f1e37faa21d63d7f479aa4cf9afa7221d07eff7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 42e7ae47c2dac2d98272ac99239e40bd59398891 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <v.ondruch@tiscali.cz>
Date: Tue, 9 Apr 2013 11:12:02 +0300
Subject: [PATCH] Fix Ruby 2.0.0 compatibility

#respond_to? now exclude protected methods.
---
 lib/rack/mount/multimap.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rack/mount/multimap.rb b/lib/rack/mount/multimap.rb
index 6b773e2..b88630b 100644
--- a/lib/rack/mount/multimap.rb
+++ b/lib/rack/mount/multimap.rb
@@ -125,7 +125,7 @@ def update_container(key)
       end
 
       def iterate_over_container(container)
-        if container.respond_to?(:each_container_with_default)
+        if container.respond_to?(:each_container_with_default, true)
           container.each_container_with_default do |value|
             yield value
           end
-- 
1.9.3