I wanted to check if my_number was in a certain range, including the higher Value.
In an IF Statement I\'d simply use \"x > 100 && x <= 500\"
But
It should just work like you said. The below case construct includes the value 500.
case my_number
# between 100 and 500
when 100..500
puts "Correct, do something"
end
So:
case 500
when 100..500
puts "Yep"
end
will return Yep
Or would you like to perform a separate action if the value is exactly 500?