Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

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.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #difference #ruby
ADD COMMENT
Topic
Name
6+9 =