diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-31 15:31:04 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-31 15:36:32 -0700 |
commit | 7391f7728d96c2ec0113de57f3316c191043ad2c (patch) | |
tree | ab42f79ec0dbb350f915b110ab088c76042cd43b /actionpack | |
parent | 3a9775076fc4f99f8d7ad9a554a9ef8798c8fad7 (diff) | |
download | rails-7391f7728d96c2ec0113de57f3316c191043ad2c.tar.gz rails-7391f7728d96c2ec0113de57f3316c191043ad2c.tar.bz2 rails-7391f7728d96c2ec0113de57f3316c191043ad2c.zip |
Ruby 1.8.7 compat: work around broken DelegateClass#respond_to?
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/cgi_ext/cookie.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 <tt>cookie-name => cookie-object</tt> # pairs. # |