On Tue, Sep 22, 2009 at 02:48, Joe Swatosh <joe.swatosh_at_gmail.com> wrote:
>...
> No worries about the breakage, this is by far not the biggest issue there.
>
> The Ruby bindings tests assert a lot of behavior of various APIs, not just
> the bindings themselves (which is one of the reasons the are so often
> reporting failures).
>
> Usually, I read the doc string before sending an email to the list to check
> if the asserted behavior is documented, not just a result of the current
> implementation (sorry I skipped that step this time). Reading it now:
>
> /** Examine utf8-encoded @a file to determine if it can be described by a
> * known (as in, known by this function) Multipurpose Internet Mail
> * Extension (MIME) type. If so, set @a *mimetype to a character string
> * describing the MIME type, else set it to @c NULL.
> *
> * If not @c NULL, @a mimetype_map is a hash mapping <tt>const char *</tt>
> * filename extensions to <tt>const char *</tt> MIME types, and is the
> * first source consulted regarding @a file's MIME type.
> *
> * Use @a pool for any necessary allocations.
> *
> * @since New in 1.5.
> */
>
> ...it doesn't specifically state that the file must exist (although saying that
> the file is utf8-encoded might imply it does?). Ah, but when the mimetype_map
> is supplied it only checks the extension. Okay, I think I get it. I'll remove
> that assertion.
How about clarifying the docstring, too? That would help to prevent
future, similar problems.
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2397671
Received on 2009-09-22 08:51:21 CEST