Checking if an element exists inside an array created with %w(), Ruby

前端 未结 0 845
-上瘾入骨i
-上瘾入骨i 2020-12-04 02:16

I know I can use %w() as a shortcut to create an array. E.g. these should be equivalent:

FOO = %w(dog, cat)
BAR = ["dog", "cat"]


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