Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
.join can be argless, cleaning
  • Loading branch information
sergot committed Jul 22, 2014
1 parent 2bc8f67 commit da5adee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/Failure.pm
Expand Up @@ -56,7 +56,7 @@ multi sub fail($payload) is hidden_from_backtrace {
$fail
}
multi sub fail(*@msg) is hidden_from_backtrace {
my $payload = @msg == 1 ?? @msg[0] !! @msg.join('');
my $payload = @msg == 1 ?? @msg[0] !! @msg.join;
die $payload if $*FATAL;
my $fail := Failure.new(X::AdHoc.new(:$payload));
my Mu $return := nqp::getlexcaller('RETURN');
Expand Down
2 changes: 1 addition & 1 deletion src/core/Real.pm
Expand Up @@ -73,7 +73,7 @@ my role Real does Numeric {
push @frac_digits, @conversion[$frac.Int];
$frac = $frac - $frac.Int;
}
my Str $r = $int_part.base($base) ~ '.' ~ @frac_digits.join('');
my Str $r = $int_part.base($base) ~ '.' ~ @frac_digits.join;
# if $int_part is 0, $int_part.base doesn't see the sign of self
$int_part == 0 && self < 0 ?? '-' ~ $r !! $r;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/Str.pm
Expand Up @@ -802,7 +802,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
!! $p ~~ /<.lower>/ ?? $s.lc
!! $s;
}
@chars.join('');
@chars.join;
}

method samespace(Str:D: Str:D $pat) {
Expand Down Expand Up @@ -1221,7 +1221,7 @@ sub unbase_bracket($base, @a) {
}

sub chrs(*@c) returns Str:D {
@c.map({.chr}).join('');
@c.map({.chr}).join;
}

sub substr-rw($s is rw, $from = 0, $chars = $s.chars - $from) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/control.pm
Expand Up @@ -151,7 +151,7 @@ multi sub die(*@msg) is hidden_from_backtrace {

multi sub warn(*@msg) is hidden_from_backtrace {
my $ex := nqp::newexception();
nqp::setmessage($ex, nqp::unbox_s(@msg.join('')));
nqp::setmessage($ex, nqp::unbox_s(@msg.join));
nqp::setextype($ex, nqp::const::CONTROL_WARN);
#?if parrot
nqp::bindattr($ex, Exception, 'severity', nqp::p6box_i(pir::const::EXCEPT_WARNING));
Expand Down

0 comments on commit da5adee

Please sign in to comment.