Skip to content

Commit

Permalink
Throw on NaN values to Baggy.roll/.pick/.grab
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed May 8, 2017
1 parent 0bd39de commit 60f8981
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Baggy.pm
Expand Up @@ -519,6 +519,8 @@ my role Baggy does QuantHash {
}

method !ROLLPICKGRABN(\count, @pairs, :$keep) { # N times
nqp::istype(count, Int)
|| X::Invalid::ComputedValue.new(:name<count>, :value(count)).throw;
Seq.new(class :: does Iterator {
has Int $!total;
has int $!elems;
Expand Down

0 comments on commit 60f8981

Please sign in to comment.