On 16/01/08 at 21:37 -0800, JP Sugarbroad wrote:
> Package: libruby1.9
> Version: 1.9.0.0-2
> Severity: normal
> Tags: patch
> 
> These might apply to 1.8 also.
> 
> --- /tmp/http.rb      2008-01-16 21:35:38.000000000 -0800
> +++ /usr/lib/ruby/1.9.0/net/http.rb   2008-01-16 21:32:20.000000000 -0800
> @@ -1237,11 +1237,12 @@
>  
>      # Sets the header field corresponding to the case-insensitive key.
>      def []=(key, val)
> -      unless val
> +      if val
> +        @header[key.downcase] = [val]
> +      else
>          @header.delete key.downcase
> -        return val
>        end
> -      @header[key.downcase] = [val]
> +      return val
>      end
>  
>      # [Ruby 1.8.3]
> @@ -1521,7 +1522,7 @@
>      private :encode_kvpair
>  
>      def urlencode(str)
> -      str.gsub(/[^a-zA-Z0-9_\.\-]/n) {|s| sprintf('%%%02x', s[0]) }
> +      str.gsub(/[^a-zA-Z0-9_\.\-]/n) {|s| sprintf('%%%02x', s[0].ord) }
>      end
>      private :urlencode

Hi,

Please provide an example of code that fails because of this. Also, it
might be a better idea to report bugs in the stdlib upstream.
-- 
| Lucas Nussbaum
| [EMAIL PROTECTED]   http://www.lucas-nussbaum.net/ |
| jabber: [EMAIL PROTECTED]             GPG: 1024D/023B3F4F |



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to