Skip to content

Commit

Permalink
DeTABify core settings
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jul 15, 2015
1 parent 81d569f commit 8e5525e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/core/Block.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ my class Block { # declared in BOOTSTRAP
# Normal Positionals
my Int $idx = -1;
for $sig.params.grep(*.positional) -> $parm {
$idx++;
$idx++;
unless $idx < primers.list.elems {
@plist.push($parm);
@clist.push($capwrap ~ '[' ~ @plist.end ~ ']');
Expand Down
26 changes: 13 additions & 13 deletions src/core/Rational.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,19 @@ my role Rational[::NuT, ::DeT] does Real {
}

method base-repeating($base = 10) {
return ~self, '' if self.narrow ~~ Int;
my (@quotients, @remainders, %remainders);
push @quotients, [div] my ($nu, $de) = self.nude;
loop {
push @remainders, $nu %= $de;
last if %remainders{$nu}++ or $nu == 0;
$nu *= $base;
push @quotients, $nu div $de;
}
@quotients.=map(*.base($base));
my @cycle = $nu ?? splice(@quotients, @remainders.first-index($nu) + 1) !! ();
splice @quotients, 1, 0, '.';
@quotients.join, @cycle.join;
return ~self, '' if self.narrow ~~ Int;
my (@quotients, @remainders, %remainders);
push @quotients, [div] my ($nu, $de) = self.nude;
loop {
push @remainders, $nu %= $de;
last if %remainders{$nu}++ or $nu == 0;
$nu *= $base;
push @quotients, $nu div $de;
}
@quotients.=map(*.base($base));
my @cycle = $nu ?? splice(@quotients, @remainders.first-index($nu) + 1) !! ();
splice @quotients, 1, 0, '.';
@quotients.join, @cycle.join;
}

method succ {
Expand Down
2 changes: 1 addition & 1 deletion src/core/Str.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
multi method chars(Str:D:) returns Int:D {
nqp::p6box_i(nqp::chars($!value))
}
multi method chars(Str:U:) returns Int:D {
multi method chars(Str:U:) returns Int:D {
self.Str; # generate undefined warning
0
}
Expand Down

0 comments on commit 8e5525e

Please sign in to comment.