From 7391f7728d96c2ec0113de57f3316c191043ad2c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 31 May 2008 15:31:04 -0700 Subject: Ruby 1.8.7 compat: work around broken DelegateClass#respond_to? --- actionpack/lib/action_controller/cgi_ext/cookie.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/cgi_ext/cookie.rb b/actionpack/lib/action_controller/cgi_ext/cookie.rb index ef033fb4f3..009ddd1c64 100644 --- a/actionpack/lib/action_controller/cgi_ext/cookie.rb +++ b/actionpack/lib/action_controller/cgi_ext/cookie.rb @@ -78,6 +78,12 @@ class CGI #:nodoc: buf end + # FIXME: work around broken 1.8.7 DelegateClass#respond_to? + def respond_to?(method, include_private = false) + return true if super(method) + return __getobj__.respond_to?(method, include_private) + end + # Parses a raw cookie string into a hash of cookie-name => cookie-object # pairs. # -- cgit v1.2.3