summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/net/http.rb6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d61414b1d..5fd2fccdc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Mar 5 19:42:09 2004 Minero Aoki <aamine@loveruby.net>
+
+ * 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]
+
Fri Mar 5 00:51:35 2004 Dave Thomas <dave@pragprog.com>
* lib/test/unit.rb: MOve RDoc documentation so that you can
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
#