Skip to content

Commit

Permalink
force list context when random_subset used in dprecated macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Mar 7, 2024
1 parent 9cefdf9 commit 3fb9c0f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions macros/ui/PGchoicemacros.pl
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,9 @@ sub invert {

sub NchooseK {
my ($n, $k) = @_;
return random_subset($k, 0 .. $n - 1);
# force list context
my @return = random_subset($k, 0 .. $n - 1);
return @return;
}

=item [DEPRECATED] shuffle()
Expand All @@ -815,7 +817,9 @@ sub NchooseK {

sub shuffle {
my ($i) = @_;
return random_subset($i, 0 .. $i - 1);
# force list context
my @return = random_subset($i, 0 .. $i - 1);
return @return;
}

=item [DEPRECATED] match_questions_list()
Expand Down

0 comments on commit 3fb9c0f

Please sign in to comment.