[racket-dev] [plt] Push #26399: master branch updated

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Fri Mar 1 16:26:32 EST 2013

On 2013-03-01 16:23:26 -0500, asumu at racket-lang.org wrote:
> 50cd464 Asumu Takikawa <asumu at racket-lang.org> 2013-03-01 16:20
> :
> | Another small contract fix
> :
>   M collects/net/dns.rkt | 2 +-
>
> collects/net/dns.rkt
> ~~~~~~~~~~~~~~~~~~~~
> --- OLD/collects/net/dns.rkt
> +++ NEW/collects/net/dns.rkt
> @@ -12,7 +12,7 @@
>            [dns-get-name
>             (-> ip-address-string? ip-address-string? string?)]
>            [dns-get-mail-exchanger
> -           (-> ip-address-string? ip-address-string? string?)]
> +           (-> ip-address-string? string? (or/c bytes? string?))]
>            [dns-find-nameserver
>             (-> (or/c ip-address-string? #f))]))

The docs for net/dns claim that `dns-get-mail-exchanger` always returns
a string, but it turns out that it returns bytestrings on certain
inputs. Is the the right fix here to normalize all the outputs to
strings? Or leave it as is and just change the docs?

Cheers,
Asumu

Posted on the dev mailing list.