class A
end
t = :name
if t.is_a?(Symbol) # true
puts 't true'
end
if A.is_a?(Symbol) # false
puts 'A true'
end
if 12.is_a?(Integer) #true
puts '12'
end
ref:
http://www.ruby-doc.org/core/classes/Symbol.html
http://www.ruby-doc.org/docs/Tutorial/part_01/objects.html
write by feng |