Why would the if statement work, but the case statement not work?
class A end # => nil a= A.new # => #<A:0x00007fd9d6134770> If statement works
a.class == A # => true Case statement does not work
case a.class # => A when A puts "done" else puts "else" # => nil end # => nil # >> else I read that case statement use === operators instead of ==, how do I use == for the case statement?
a.class === A.==, it is always===.