+ 2

Ruby

I have typed the code as it is from concept called frequency counter, but it showing error https://code.sololearn.com/cTTNCTi0V1Pl/?ref=app

14th Apr 2022, 5:35 AM
HELL DRAGON
HELL DRAGON - avatar
6 ответов
+ 1
Okkk got that
14th Apr 2022, 5:59 AM
HELL DRAGON
HELL DRAGON - avatar
+ 1
Thank u
14th Apr 2022, 6:00 AM
HELL DRAGON
HELL DRAGON - avatar
0
HELL DRAGON There is no such method 'each_char' in Ruby Hash {} there should be b.each_char or do like this: https://code.sololearn.com/cZG13vjG1lNr/?ref=app
14th Apr 2022, 5:55 AM
A͢J
A͢J - avatar
0
But it was mentioned in frequency counter concept in ruby , each_char , is there is any bugs in that?
14th Apr 2022, 5:58 AM
HELL DRAGON
HELL DRAGON - avatar
0
HELL DRAGON Hash {} contains key value pair so each_char cannot be a method of Hash {} it is a method of String so there should be b.each_char
14th Apr 2022, 6:00 AM
A͢J
A͢J - avatar
0
Okay 😁
14th Apr 2022, 6:02 AM
HELL DRAGON
HELL DRAGON - avatar