--Sig_/G0um/kAgADMXnzNbA1iT94W
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Wed, 29 Jan 2014 15:52:43 +0100
Arup Rakshit <lists / ruby-forum.com> wrote:

> if I understand this `Animal.respond_to?(:bark) # =3D> false`, I can't
> understand `Object.respond_to?(:foo) # =3D> true` .

1.9.3p484 (main):001:0> Object.is_a?(Class)
true
1.9.3p484 (main):002:0> Class.is_a?(Object)
true

Because Object inherits from Class and Class inherits from the Object

--=20
Sergey Avseyev

--Sig_/G0um/kAgADMXnzNbA1iT94W
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iF4EAREIAAYFAlLpGJMACgkQuMUkJ4cs99PcWgD+Jyq0aMY8NiJno56CLqE4kFB0
8mY5O0kt9SrEwKpgZcQBAL6boPnV4dQLP0CiFDMwMwllVqWl6XR+yoMPjjNBXhsX
=G7vA
-----END PGP SIGNATURE-----

--Sig_/G0um/kAgADMXnzNbA1iT94W--
On Wed, 29 Jan 2014 15:52:43 +0100
Arup Rakshit <lists / ruby-forum.com> wrote:

> if I understand this `Animal.respond_to?(:bark) # =3D> false`, I can't
> understand `Object.respond_to?(:foo) # =3D> true` .

1.9.3p484 (main):001:0> Object.is_a?(Class)
true
1.9.3p484 (main):002:0> Class.is_a?(Object)
true

Because Object inherits from Class and Class inherits from the Object

--=20
Sergey Avseyev
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iF4EAREIAAYFAlLpGJMACgkQuMUkJ4cs99PcWgD+Jyq0aMY8NiJno56CLqE4kFB0
8mY5O0kt9SrEwKpgZcQBAL6boPnV4dQLP0CiFDMwMwllVqWl6XR+yoMPjjNBXhsX
=G7vA
-----END PGP SIGNATURE-----