From: Chad Perrin Date: 2010-11-13T13:15:36+09:00 Subject: Re: what's an object? --H+4ONPRPur6+Ovig Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 12, 2010 at 04:59:02PM +0900, Robert Klemme wrote: > > On Thu, Nov 11, 2010 at 9:05 PM, Chad Perrin wrote: > >> > >> Instead, if you want to use it, you need to do this: > >> > >> =A0 =A0> foo =3D 1.method('+') > >> =A0 =A0> foo.call(3) > >> =A0 =A04 >=20 > You can even do >=20 > irb(main):001:0> foo =3D 1.method '+' > =3D> # > irb(main):002:0> foo[3] > =3D> 4 >=20 > which is pretty close to foo(3). You appear to be confusing syntax with semantics here. Sure, brackets look a little like parentheses -- but they aren't, and they mean very, very different things in Ruby. >=20 > >> That's because a "method object" is not a method; it is a proc that wr= aps > >> the method and its scope context. >=20 > Exactly. So . . . you agree with me. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --H+4ONPRPur6+Ovig Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzeD3EACgkQ9mn/Pj01uKXexACgqIdV8S9AGKwgC4AfrJ1boBHs 1cgAoLjTVeP/3lRf2tz46IWWP9uQvL/r =XIdC -----END PGP SIGNATURE----- --H+4ONPRPur6+Ovig--