Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Switch from sprintf to p6 interpolation.
Don't use sprintf (which doesn't work well yet in JVM) for something we can do with good old interpolation.
  • Loading branch information
colomon committed Jul 3, 2013
1 parent c96b216 commit c83b634
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/Str.pm
Expand Up @@ -970,9 +970,8 @@ my class Str does Stringy {
my Int $outdent = $steps ~~ Whatever ?? $common-prefix
!! -$steps;

warn sprintf('Asked to remove %d spaces, ' ~
'but the shortest indent is %d spaces',
$outdent, $common-prefix) if $outdent > $common-prefix;
warn "Asked to remove $outdent spaces, but the shortest indent is $common-prefix spaces"
if $outdent > $common-prefix;

# Work backwards from the right end of the indent whitespace, removing
# array elements up to # (or over, in the case of tab-explosion)
Expand Down

0 comments on commit c83b634

Please sign in to comment.