diff options
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 # |