mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ruby 1.8.7 compat: work around broken DelegateClass#respond_to?
This commit is contained in:
parent
3a9775076f
commit
7391f7728d
1 changed files with 6 additions and 0 deletions
|
@ -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.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue