From 85c881c1c8884f169d9f561267d52b953eb122e6 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 25 Jun 2025 15:18:23 -0500 Subject: [PATCH] include comment about sample method --- run_names.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_names.rb b/run_names.rb index e0359e3..b6808d7 100644 --- a/run_names.rb +++ b/run_names.rb @@ -29,7 +29,7 @@ pick_order = participants.shuffle pick_order.each do |participant| while participant.buys_for == nil - pick = hat[rand(hat.length)] + pick = hat[rand(hat.length)] # could use hat.sample instead, the sample method randomly picks from an array. puts "#{participant.name} picks #{pick.name}" unless pick == participant participant.buys_for = pick