Range containability check : Range include « Range « Ruby
- Ruby
- Range
- Range include
Range containability check
puts (1..10) === 5
puts (1..10) === 15
puts (1..10) === 3.14159
puts ('a'..'j') === 'c'
puts ('a'..'j') === 'z'
Related examples in the same category