Navigation Menu

Skip to content

Commit

Permalink
stringify self in Cool.trim-{leading,trailing}
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jun 22, 2010
1 parent 7b5b9d5 commit ad2afb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Cool-str.pm
Expand Up @@ -362,7 +362,7 @@ augment class Cool {

# Not yet spec'd, I expect it will be renamed
multi method trim-leading() is export {
if self ~~ /^\s*:(.*)$/ {
if ~self ~~ /^\s*:(.*)$/ {
~$/[0];
} else {
self;
Expand All @@ -371,7 +371,7 @@ augment class Cool {

# Not yet spec'd, I expect it will be renamed
multi method trim-trailing() is export {
if self ~~ /^(.*\S)\s*$/ {
if ~self ~~ /^(.*\S)\s*$/ {
~$/[0];
} elsif self ~~ /^\s*$/ {
"";
Expand Down

0 comments on commit ad2afb5

Please sign in to comment.