Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make Parcel.new('a') work as specced
  • Loading branch information
lizmat committed Oct 2, 2014
1 parent 230233b commit 9814e86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/Parcel.pm
Expand Up @@ -3,7 +3,11 @@ my class Parcel does Positional { # declared in BOOTSTRAP
# has Mu $!storage; # VM's array of Parcel's elements
# has Str $!WHICH;

submethod BUILD() { $!storage := nqp::list() }
multi method new(|) {
my Mu $args := nqp::p6argvmarray();
nqp::shift($args);
nqp::p6parcel($args, Nil)
}

multi method Bool(Parcel:D:) { nqp::p6bool($!storage) }
multi method Numeric(Parcel:D:) { nqp::elems($!storage) }
Expand Down

0 comments on commit 9814e86

Please sign in to comment.