From 9650ddfa93fa0b7df9bfd38f4bfb11677339236b Mon Sep 17 00:00:00 2001 From: Tom Stuart Date: Tue, 10 May 2011 09:59:25 +0100 Subject: [PATCH] 624 Don't hate the player, hate the game. --- lib/golf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/golf.rb b/lib/golf.rb index 15a8cfb..ceb8ce9 100644 --- a/lib/golf.rb +++ b/lib/golf.rb @@ -1,6 +1,6 @@ a=Golf=Hash i=0 - %q^ + %q a.inject :* a.split.sort_by{|w|w[1]}*" " @@ -40,7 +40,7 @@ return e[-1][0] if e[-1][1] >= e.inject(0){|x,(y,z)|x+z}/2 b.map!{|x|x-[e[0][0]]} } - ^.split(/ + .split(/ /).map{|$a|eval "def a.hole#{i+=1} a #$a