Answers for "ruby is_a? alternative"

0

difference between is_a and kind_of ruby

"hello".is_a? Object and "hello".kind_of? Object return true because "hello" is a String and String is a subclass of Object.
However "hello".instance_of? Object returns false.
Posted by: Guest on September-16-2020

Browse Popular Code Answers by Language