On Sat, Aug 09, 2008 at 10:24:20AM -0700, Carl Mäsak wrote:
> Patch attached.
> 
> I've also fudged t/builtins/strings/subst.t in the Pugs repo, so that
> it passes with this patch applied.

Thanks!  A couple of items:

1.  I suspect this method really belongs in src/builtins/any-str.pir
    instead of the C<Str> class, so that we can do replacements on
    the stringification of any invocant (not just C<Str> objects).

2.  The :multi() is likely incorrect, even as a method of C<Str>.
    Any object should be usable as a pattern/replacement, not just
    C<Str> objects.  For example, I think that these ought to 
    be equivalent:

           $foo.subst('3', '4')
           $foo.subst(<3>, <4>)
           $foo.subst(3, 4)

    I.e., the caller shouldn't have to be concerned about coercing
    the parameters to C<Str> objects in order to invoke the builtin
    C<subst> method.

Thanks again!

Pm

Reply via email to