diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-05 10:42:43 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-05 10:42:43 +0000 |
commit | 87275504ab0690e243401db6985f6253ccc17b65 (patch) | |
tree | a4bf25c1ad58146102acdb8bb3e17a548239ef57 /lib/net/http.rb | |
parent | 1c1a61a436623cda35085246aed2f5c81802b23f (diff) | |
download | ruby-87275504ab0690e243401db6985f6253ccc17b65.tar.gz |
* lib/net/http.rb (HTTPResponse#to_ary): should return an object which does not respond to #to_ary. It causes infinite loop in puts. [ruby-core:02578]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r-- | lib/net/http.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 6e0e7e03ab..b0334a2757 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1607,7 +1607,11 @@ module Net # :nodoc: # def to_ary warn "net/http.rb: warning: Net::HTTP v1.1 style assignment found at #{caller(1)[0]}; use `response = http.get(...)' instead." if $VERBOSE - [self, body()] + res = self.dup + class << res + undef to_ary + end + [res, res.body] end # |