I've solved it.

(a) There's two encodings for which I don't have converters, or for which
    none exist. These are now being skipped in the test code. If you don't skip
    them, then it's an error in the test code and the lib code is never called.

(b) Sometimes, using regexps is overkill. This is one of the important things
    to learn on route to mastery of regexps! (I used to teach this stuff (-:)

    Instead, my solution does a far simpler test: it's true if the string is
    not nil? and if it is different from the "" value in the relevant encoding.

    This bypasses any trip into regexp library, and it doesn't require a
    full string scan (compare << (str = '%099999999d' % 0) =~ /./ >> vs
    << (str = '%099999999d' % 0) =~ /.+/ >>).