From: "lshevtsov (Leonid Shevtsov)" Date: 2012-04-22T21:04:27+09:00 Subject: [ruby-core:44530] [ruby-trunk - Bug #6340][Open] Redefine Net::HTTPResponse#to_ary to avoid implicit conversion errors Issue #6340 has been reported by lshevtsov (Leonid Shevtsov). ---------------------------------------- Bug #6340: Redefine Net::HTTPResponse#to_ary to avoid implicit conversion errors https://bugs.ruby-lang.org/issues/6340 Author: lshevtsov (Leonid Shevtsov) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] I've hit a nasty and subtle bug in code using the deprecated Net::HTTPResponse to_ary conversion: https://github.com/joshfrench/rakismet/pull/17 Up to Ruby 1.9.2 the method generated a warning, but in 1.9.3 it's removed completely. The problem is, array conversion still happened implicitly and without warnings, but the second variable (which should have been assigned with the response's body) did not get assigned at all. I suggest redefining the method with an explicit exception to make this mistake less subtle. -- http://bugs.ruby-lang.org/