S
SpringFlowers AutumnMoon
There is no such thing as
if 3 in [3, 2, 1]
construct in Ruby? so the common way in Ruby is
if list1.include?(3)
or
if list1.index(3)
is that right? is there an idiom in Ruby to do something like
if 3.in([3,2,1])
or
if 3.in [3,2,1]
if 3 in [3, 2, 1]
construct in Ruby? so the common way in Ruby is
if list1.include?(3)
or
if list1.index(3)
is that right? is there an idiom in Ruby to do something like
if 3.in([3,2,1])
or
if 3.in [3,2,1]