Creating hash with multiple words using split method

前端 未结 0 812
生来不讨喜
生来不讨喜 2020-12-31 03:51

So I have a text file and some of the values are :
mom : dad
brother : sister

I created a hash with using this file:

hash = Hash[*File.read         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题