Permalink
Browse files

Ruby 1.8.7 compat: work around broken DelegateClass#respond_to?

  • Loading branch information...
1 parent 3a97750 commit 7391f7728d96c2ec0113de57f3316c191043ad2c @jeremy jeremy committed May 31, 2008
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_controller/cgi_ext/cookie.rb
View
6 actionpack/lib/action_controller/cgi_ext/cookie.rb
@@ -78,6 +78,12 @@ def to_s
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 <tt>cookie-name => cookie-object</tt>
# pairs.
#

0 comments on commit 7391f77

Please sign in to comment.