Ruby - Inheritance
Which of the following expressions correctly checks if
obj is an instance of class String or its subclass?obj is an instance of class String or its subclass?obj is a String or subclass, use is_a? with String.is_a? with String. Others check wrong classes or use instance_of? which does not check subclasses.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions