Hi,

In message "Re: [ruby-core:19737] [Bug #723] Net::HTTPHeader doesn't check the type of the 'value'"
    on Sat, 8 Nov 2008 18:39:01 +0900, "Dmitry A. Ustalov" <redmine / ruby-lang.org> writes:

|Bug #723: Net::HTTPHeader doesn't check the type of the 'value'
|http://redmine.ruby-lang.org/issues/show/723
|
|Author: Dmitry A. Ustalov
|Status: Open, Priority: Normal
|
|initialize_http_header() method of the Net::HTTPHeader doesn't check the type of the 'value', and crashes with exception:
|---8<---
|/usr/lib/ruby/1.8/net/http.rb:1142:in `initialize_http_header':
|undefined method `strip' for 1.43:Float (NoMethodError)

The report lacks the situation info where the error happened, so I
cannot say for sure, but in general, if you pass a float value when
string is required, I think raising error is a sane result.  Implicit
conversion often causes more problems than it solves.  Is there any
reason that you cannot convert the value to string by yourself?

							matz.