diff options
author | Simon Parri <simonparri@ganzeria.com> | 2020-10-22 13:55:35 -0500 |
---|---|---|
committer | Simon Parri <simonparri@ganzeria.com> | 2020-10-22 13:55:35 -0500 |
commit | e7ddad7d3ed5af2f02ef86c4ad89b8aa7c27b62a (patch) | |
tree | c543fdd268a6937f42ee11febf3faaeb1a7e7e8b | |
parent | 73ced2e44aa21e17e88f59774f7505fcfaf46545 (diff) | |
download | spelling-rbee-e7ddad7d3ed5af2f02ef86c4ad89b8aa7c27b62a.tar.gz spelling-rbee-e7ddad7d3ed5af2f02ef86c4ad89b8aa7c27b62a.zip |
Fix fatal regression in spelling-rbee
-rwxr-xr-x | spelling-rbee | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/spelling-rbee b/spelling-rbee index 1c79af0..0a83cd9 100755 --- a/spelling-rbee +++ b/spelling-rbee @@ -26,18 +26,11 @@ def read(file) end def repl(words) - results = [] + rr = [] words.each do |word| say word - result = get - # while result[0] == ":" - # ckopt(word,result) - # if $exit - # return $exit - # end - # result = get - # end - case result + r = get + case r when ":r" redo when ":imacheaterandknowit" @@ -47,15 +40,15 @@ def repl(words) $exit = true end break if $exit - results.push ckword(word,result) + rr.push ckword(word, r) end - return results + return rr end def results(words) - results = [] + correct = [] words.each {|word| - results.push(word[0] + ": " + word[1] + ": " + word[2]) + correct.push(word[0] + ": " + word[1] + ": " + word[2]) } return correct end @@ -63,9 +56,9 @@ end def run(file = (ARGV[0] || "http://zoar.cx/~simon/21k/words.txt")) $exit = false words = read file - correct = repl words + rr = repl words return true if $exit - puts results results + puts results rr end run |