Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
encode method should do the buffer creation.
This is 'cus we may need to pun a role to do so, which is best done
here, not inside of some op.
  • Loading branch information
jnthn committed Jul 21, 2013
1 parent da24001 commit 4c60347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Str.pm
Expand Up @@ -769,7 +769,7 @@ my class Str does Stringy {
method encode(Str:D $encoding = 'utf8') {
my $enc := NORMALIZE_ENCODING($encoding);
my $enc_type := %enc_type.exists($enc) ?? %enc_type{$enc} !! blob8;
nqp::encode(nqp::unbox_s(self), nqp::unbox_s($enc), nqp::decont($enc_type))
nqp::encode(nqp::unbox_s(self), nqp::unbox_s($enc), nqp::decont($enc_type.new))
}

method capitalize(Str:D:) is DEPRECATED {
Expand Down

0 comments on commit 4c60347

Please sign in to comment.