Create a histogram - 4. Creating the frequencies Hash


undefined local variable or method `text' for # Context:0x10759e4

Hi, good day.
I have a problem when trying to set the frequencies Hash. 
According to what I could find in the forum, my code seems to be correct, still I get a "undefined local variable or method `text' for #<Context:0x10759e4>" error back.
I linked a screenshot below.
Any help on this is much appreciated.




Line 2 has got an issue. Text is a variable you wish to get as an input. You do that by:

text = gets.chomp

I hope this helps! :wink:


Awesome, thanks a lot.
It's kinda obvious actually, but the previous step passed with this code.
Anyhow, thanks


You're welcome. Glad I could be of help!

Have fun coding! :wink:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.