def word_stats(text) text.split(" ").group_by{|e| text(e) += 1} end p word_stats("We'll see who has the last laugh")
Standard input is empty
Standard output is empty
prog.rb:2: syntax error, unexpected tOP_ASGN, expecting '}' text.split(" ").group_by{|e| text(e) += 1} ^