method
instance_of?
v1_9_1_378 -
Show latest stable
- Class:
Object
instance_of?(p1)public
Returns true if obj is an instance of the given class. See also Object#kind_of?.
VALUE
rb_obj_is_instance_of(VALUE obj, VALUE c)
{
switch (TYPE(c)) {
case T_MODULE:
case T_CLASS:
case T_ICLASS:
break;
default:
rb_raise(rb_eTypeError, "class or module required");
}
if (rb_obj_class(obj) == c) return Qtrue;
return Qfalse;
} Related methods
- Instance methods
- !~
- ===
- =~
- CSV
- DelegateClass
- __getobj__
- __id__
- __setobj__
- check_sizeof
- chmod
- class
- clone
- cp
- create_docfile
- create_header
- create_makefile
- create_win32ole_makefile
- dclone
- default_handler
- default_src_encoding
- define_singleton_method
- depend_rules
- dir_config
- display
- dummy_makefile
- dup
- enable_config
- enum_for
- eql?
- extend
- find_executable
- find_header
- find_library
- find_type
- freeze
- frozen?
- hash
- have_const
- have_func
- have_header
- have_library
- have_macro
- have_struct_member
- have_type
- have_var
- help
- initialize_copy
- inspect
- install
- instance_of?
- instance_variable_defined?
- instance_variable_get
- instance_variable_set
- instance_variables
- is_a?
- kind_of?
- listup
- ln
- method
- methods
- mkdir
- mkmf
- mv
- navigate
- nil?
- object_id
- pretty_print
- pretty_print_cycle
- private_methods
- protected_methods
- public_method
- public_methods
- public_send
- respond_to?
- rm
- rmdir
- send
- setup
- singleton_methods
- stop_msg_loop
- sysread
- taint
- tainted?
- tap
- timeout
- to_enum
- to_json
- to_s
- to_yaml
- to_yaml_properties
- to_yaml_style
- touch
- trust
- try_const
- try_type
- untaint
- untrust
- untrusted?
- wait_writable
- with_config
- xmp
- Class methods
- json_create
- version
- Private methods
-
remove_instance_variable