==
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
Related methods
- Class methods (4)
-
json_create (<= v1_9_2_180)
-
new (<= v1_8_7_330)
-
version (<= v1_9_1_378)
-
yaml_tag
- Instance methods (143)
-
<=>
-
=~
-
== (<= v1_8_7_330)
-
===
-
!~
-
[] (>= v2_6_3)
-
[]= (>= v2_6_3)
-
assert_Qundef
-
check_signedness (<= v1_9_3_392)
-
check_sizeof (<= v1_9_3_392)
-
chmod
-
class
-
clone
-
component (>= v2_6_3)
-
convertible_int (<= v1_9_3_392)
-
cp
-
create_docfile (<= v1_9_2_180)
-
create_header (<= v1_9_3_392)
-
create_makefile (<= v1_9_3_392)
-
create_win32ole_makefile (<= v1_9_2_180)
-
CSV
-
dclone
-
default_handler (<= v1_9_2_180)
-
default_src_encoding (<= v2_4_6)
-
define_singleton_method
-
DelegateClass
-
depend_rules (<= v1_9_3_392)
-
Digest
-
dir_config (<= v1_9_3_392)
-
display
-
dummy_makefile (<= v1_9_3_392)
-
dup
-
element (>= v2_6_3)
-
enable_config (<= v1_9_3_392)
-
enum_for
-
eql?
-
equal? (<= v1_8_7_330)
-
extend
-
find_executable (<= v1_9_3_392)
-
find_header (<= v1_9_3_392)
-
find_library (<= v1_9_3_392)
-
find_type (<= v1_9_3_392)
-
freeze
-
frozen?
-
gemfile (>= v2_6_3)
-
__getobj__
-
hash
(<= v2_4_6)
-
have_const (<= v1_9_3_392)
-
have_framework (<= v1_9_3_392)
-
have_func (<= v1_9_3_392)
-
have_header (<= v1_9_3_392)
-
have_library (<= v1_9_3_392)
-
have_macro (<= v1_9_3_392)
-
have_struct_member (<= v1_9_3_392)
-
have_type (<= v1_9_3_392)
-
have_var (<= v1_9_3_392)
-
help
-
httpd
-
id (<= v1_8_7_330)
-
__id__ (<= v1_9_2_180)
-
initialize_clone
-
initialize_copy
-
initialize_dup
-
inspect
-
install
-
instance_eval (<= v1_8_7_330)
-
instance_exec (<= v1_8_7_330)
-
instance_of?
-
instance_variable_defined?
-
instance_variable_get
-
instance_variables
-
instance_variable_set
-
is_a?
-
itself
-
kind_of?
-
listup (<= v1_9_2_180)
-
ln
-
method
-
methods
-
mkdir
-
mkmf
-
mv
-
namespace (>= v2_6_3)
-
navigate (<= v1_9_2_180)
-
nil?
-
object_id
-
pretty_print
-
pretty_print_cycle
-
private_methods
-
protected_methods
-
psych_to_yaml (<= v2_4_6)
-
public_method
-
public_methods
-
public_send
-
rake_namespace (>= v2_6_3)
-
rawVALUE
-
remove_instance_variable
-
respond_to?
-
respond_to_missing?
-
rm
-
rmdir
-
send
-
__send__ (<= v1_8_7_330)
-
set_component (>= v2_6_3)
-
set_element (>= v2_6_3)
-
__setobj__
-
setup
-
singleton_class
-
singleton_method
-
singleton_method_added (<= v1_8_7_330)
-
singleton_method_removed (<= v1_8_7_330)
-
singleton_methods
-
singleton_method_undefined (<= v1_8_7_330)
-
stop_msg_loop (<= v1_9_2_180)
-
stub (<= v2_1_10)
-
sysread
-
taint
-
tainted?
-
tap
-
task (>= v2_6_3)
-
then (>= v2_6_3)
-
timeout
-
to_a (<= v1_8_7_330)
-
to_enum
-
to_json (<= v1_9_2_180)
-
to_s
-
touch
-
to_yaml
-
to_yaml_properties (<= v2_4_6)
-
to_yaml_style (<= v1_9_1_378)
-
trust
-
try_const (<= v1_9_3_392)
-
try_type (<= v1_9_3_392)
-
type (<= v1_8_7_330)
-
unknown (<= v2_4_6)
-
untaint
-
untrust
-
untrusted?
-
validate_object
-
wait_writable
-
with_config (<= v1_9_3_392)
-
xmp
-
yield_self
= private
= protected
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.
These similar methods exist in v2_5_5:
- Array#==
- Module#==
- Method#==
- UnboundMethod#==
- Hash#==
- Float#==
- String#==
- Range#==
- Regexp#==
- Struct#==
- Complex#==
- IPAddr#==
- Rational#==
- Vector#==
- Matrix#==
- OpenStruct#==
- Pathname#==
- Resolv::IPv4#==
- Resolv::IPv6#==
- Resolv::DNS::Message#==
- Resolv::DNS::Name#==
- Resolv::DNS::Resource#==
- Resolv::DNS::Label::Str#==
- Set#==
- Comparable#==
- Process::Status#==
- DRb::DRbObject#==
- DRb::DRbURIOption#==
- URI::Generic#==
- REXML::XMLDecl#==
- REXML::Comment#==
- REXML::Instruction#==
- REXML::Attribute#==
- REXML::Validation::Event#==
- RSS::XML::Element#==
- BasicObject#==
- BigDecimal#==
- CSV::Row#==
- CSV::Table#==
- Delegator#==
- Exception#==
- NameError::message#==
- OpenSSL::BN#==
- OpenSSL::PKey::EC::Group#==
- OpenSSL::PKey::EC::Point#==
- OpenSSL::SSL::Session#==
- Symbol#==
- Digest::Instance#==
- MatchData#==
- RDoc::Attr#==
- RDoc::Constant#==
- Random#==
- Encoding::Converter#==
- Gem::ConfigFile#==
- Gem::Dependency#==
- Gem::Package::TarHeader#==
- Gem::Platform#==
- Gem::Specification#==
- RDoc::TopLevel#==
- Fiddle::Pointer#==
- Gem::NameTuple#==
- Gem::Requirement#==
- Gem::Resolver::APISpecification#==
- Gem::Resolver::ActivationRequest#==
- Gem::Resolver::Conflict#==
- Gem::Resolver::DependencyRequest#==
- Gem::Resolver::GitSpecification#==
- Gem::Resolver::InstalledSpecification#==
- Gem::Resolver::VendorSpecification#==
- Gem::Source#==
- Gem::Source::Git#==
- Gem::Source::Lock#==
- Gem::SourceList#==
- RDoc::Comment#==
- RDoc::MethodAttr#==
- RDoc::Mixin#==
- RDoc::Options#==
- Resolv::LOC::Alt#==
- Resolv::LOC::Coord#==
- Resolv::LOC::Size#==
- Gem::Resolver::Molinillo::DependencyGraph#==
- Gem::Resolver::Molinillo::DependencyGraph::Vertex#==
- Integer#==
- OpenSSL::X509::Attribute#==
- OpenSSL::X509::CRL#==
- OpenSSL::X509::Certificate#==
- OpenSSL::X509::Extension#==
- OpenSSL::X509::Request#==
- OpenSSL::X509::Revoked#==
==(p1)
public
Equality—At the Object level, == returns true only if obj and other are the same object. Typically, this method is overridden in descendent classes to provide class-specific meaning.
Unlike ==, the equal? method should never be overridden by subclasses: it is used to determine object identity (that is, a.equal?(b) iff a is the same object as b).
The eql? method returns true if obj and anObject have the same value. Used by Hash to test members for equality. For objects of class Object, eql? is synonymous with ==. Subclasses normally continue this tradition, but there are exceptions. Numeric types, for example, perform type conversion across ==, but not across eql?, so:
1 == 1.0 #=> true 1.eql? 1.0 #=> false
/* * call-seq: * obj == other => true or false * obj.equal?(other) => true or false * obj.eql?(other) => true or false * * Equality---At the <code>Object</code> level, <code>==</code> returns * <code>true</code> only if <i>obj</i> and <i>other</i> are the * same object. Typically, this method is overridden in descendent * classes to provide class-specific meaning. * * Unlike <code>==</code>, the <code>equal?</code> method should never be * overridden by subclasses: it is used to determine object identity * (that is, <code>a.equal?(b)</code> iff <code>a</code> is the same * object as <code>b</code>). * * The <code>eql?</code> method returns <code>true</code> if <i>obj</i> and <i>anObject</i> have the * same value. Used by <code>Hash</code> to test members for equality. * For objects of class <code>Object</code>, <code>eql?</code> is * synonymous with <code>==</code>. Subclasses normally continue this * tradition, but there are exceptions. <code>Numeric</code> types, for * example, perform type conversion across <code>==</code>, but not * across <code>eql?</code>, so: * * 1 == 1.0 #=> true * 1.eql? 1.0 #=> false */ static VALUE rb_obj_equal(obj1, obj2) VALUE obj1, obj2; { if (obj1 == obj2) return Qtrue; return Qfalse; }