case "Hello".class
when Integer
print "A"
when String
print "B"
else
print "C"
end
为什么我得到“C”?期待“B”,因为如果你评估"String".class
你确实得到String
。
case "Hello".class
when Integer
print "A"
when String
print "B"
else
print "C"
end
为什么我得到“C”?期待“B”,因为如果你评估"String".class
你确实得到String
。