From: Cliff Rosson Date: 2013-03-12T00:44:26+09:00 Subject: Re: Extending Ruby. Little help or guidance if you are willing! --20cf303b42e11ec34204d7a80c78 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Got ya. So it doesn't really matter if I convert things to ID and compare on that basis or keep things a symbol. Thanks Bartosz. On Sat, Mar 9, 2013 at 10:06 PM, Bartosz Dziewo=C5=84ski wrote: > On Sun, 10 Mar 2013 04:41:32 +0100, Cliff Rosson > wrote: > > Also based on previous posts. What is the difference between a symbol an= d >> an ID? >> > > A symbol is an object of the Ruby class Symbol. It is essentially an > integer that also has a textual human-readable representation - sort of > like a magic numeric bconstant in other languages. > > An ID is an internal representation for a method/class name used in the C > Ruby implementation. Under-the-hood it uses the same machinery as a Symbo= l, > and thus can be converted to and from it easily. > > > -- > Matma Rex > > --=20 vizualize.me/cliffrosson --20cf303b42e11ec34204d7a80c78 Content-Type: text/html; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable
Got ya. So it doesn't really matter if I convert thing= s to ID and compare on that basis or keep things a symbol. Thanks Bartosz.<= /div>


On Sat, = Mar 9, 2013 at 10:06 PM, Bartosz Dziewo=F1ski <matma.rex@gmail.com&g= t; wrote:
On Sun, 10 Mar 2013 04:41:= 32 +0100, Cliff Rosson <cliff.rosson@gmail.com> wrote:

Also based on previous posts. What is the difference between a symbol and a= n ID?

A symbol is an object of the Ruby class Symbol. It is essentially an intege= r that also has a textual human-readable representation - sort of like a ma= gic numeric bconstant in other languages.

An ID is an internal representation for a method/class name used in the C R= uby implementation. Under-the-hood it uses the same machinery as a Symbol, = and thus can be converted to and from it easily.


--
Matma Rex




--
--20cf303b42e11ec34204d7a80c78--