Skip to content

Commit

Permalink
remove * from bless
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Sep 1, 2013
1 parent 59a518a commit d2a9e62
Show file tree
Hide file tree
Showing 21 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions S06-operator-overloading/workout.t
Expand Up @@ -11,8 +11,8 @@ Testing operator overloading subroutines

class Vector {
has @.coords;
multi method new (*@x where { @x.elems == 3 }) { self.bless(*, coords => @x); }
multi method new (@x where { @x.elems == 3 }) { self.bless(*, coords => @x); }
multi method new (*@x where { @x.elems == 3 }) { self.bless(coords => @x); }
multi method new (@x where { @x.elems == 3 }) { self.bless(coords => @x); }
multi method abs() is export { sqrt([+](self.coords »*« self.coords)); }
multi method Num() { die "Can't get Num from Vector"; }
}
Expand Down
2 changes: 1 addition & 1 deletion S12-class/inheritance.t
Expand Up @@ -159,7 +159,7 @@ eval_dies_ok 'class RT64642 is ::Nowhere {}', 'dies: class D is ::C {}';
#?pugs skip 'callsame'
{
my class A {
method new { self.bless(*) }
method new { self.bless }
};
my class B is A {
has $.c is rw;
Expand Down
2 changes: 1 addition & 1 deletion S12-class/lexical.t
Expand Up @@ -53,7 +53,7 @@ eval_dies_ok '{ my class B {}; B.new; }; B.new',
has Frog $.frog;
method new() {
my Frog $frog .= new;
self.bless(*, :$frog);
self.bless(:$frog);
};
}
is Forest.new.frog.speak, 'ribbit ribbit',
Expand Down
4 changes: 2 additions & 2 deletions S12-construction/construction.t
Expand Up @@ -34,7 +34,7 @@ class Foo {
has $.a;

method new ($self: Str $string) {
$self.bless(*, a => $string);
$self.bless(a => $string);
}
}

Expand Down Expand Up @@ -82,7 +82,7 @@ is Foo.new("a string").a, 'a string', "our own 'new' was called";
class MonkeyNew { has $.x is rw };
augment class MonkeyNew {
method new() {
self.bless(*, :x('called'));
self.bless(:x('called'));
}
};
is MonkeyNew.new().x, 'called', 'monkey-typed .new() method is called';
Expand Down
2 changes: 1 addition & 1 deletion S12-construction/new.t
Expand Up @@ -97,7 +97,7 @@ is $o.x, 5, '... worked for the class Parent (other order)';
has $.a2;

multi method new(Int $number, Str $color) {
self.bless(*, :a1($number), :a2($color));
self.bless(:a1($number), :a2($color));
}
}

Expand Down
4 changes: 2 additions & 2 deletions S32-num/real-bridge.t
Expand Up @@ -12,11 +12,11 @@ class Fixed2 does Real {
has Int $.one-hundredths;

multi method new(Int $a) {
self.bless(*, :one-hundredths($a * 100));
self.bless(:one-hundredths($a * 100));
}

multi method new(Rat $a) {
self.bless(*, :one-hundredths(floor($a * 100)));
self.bless(:one-hundredths(floor($a * 100)));
}

method Bridge() {
Expand Down
2 changes: 1 addition & 1 deletion S32-trig/TrigTestSupport
Expand Up @@ -12,7 +12,7 @@ class AngleAndResult
our @degrees-to-whatever-num = @degrees-to-whatever.map({ .Num });

multi method new(Int $angle_in_degrees is copy, $result is copy) {
self.bless(*, :$angle_in_degrees, :$result);
self.bless(:$angle_in_degrees, :$result);
}

multi method perl() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/atan2.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/cos.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/cosec.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/cosech.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/cosh.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/cotan.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/cotanh.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
6 changes: 3 additions & 3 deletions S32-trig/generate-tests.pl
Expand Up @@ -140,7 +140,7 @@ ($str, $angle, $fun, $type, $desired-result-rule)
Str $complex_check is copy,
Str $plus_inf is copy,
Str $minus_inf is copy) {
self.bless(*,
self.bless(
:$function_name,
:$inverted_function_name,
:$angle_and_results_name,
Expand Down Expand Up @@ -329,7 +329,7 @@ ($output_file)
has $.value;
multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}
multi method Numeric() {
Expand All @@ -341,7 +341,7 @@ ($output_file)
has $.value;
multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}
multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/sec.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/sech.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/sin.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/sinh.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/tan.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down
4 changes: 2 additions & 2 deletions S32-trig/tanh.t
Expand Up @@ -40,7 +40,7 @@ class NotComplex is Cool {
has $.value;

multi method new(Complex $value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Numeric() {
Expand All @@ -52,7 +52,7 @@ class DifferentReal is Real {
has $.value;

multi method new($value is copy) {
self.bless(*, :$value);
self.bless(:$value);
}

multi method Bridge() {
Expand Down

0 comments on commit d2a9e62

Please sign in to comment.