[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Why use __FILE_, __LINE__ in class_eval?

Ben Johnson

9/5/2008 3:48:00 PM

I've noticed in code that some people do:

class_eval src

amd some do

class_eval src, __FILE__, __LINE__

What exactly is the difference and why should I use one over the other?

Thanks for your help.
--
Posted via http://www.ruby-....

1 Answer

ara.t.howard

9/5/2008 3:52:00 PM

0


On Sep 5, 2008, at 9:48 AM, Ben Johnson wrote:

> I've noticed in code that some people do:
>
> class_eval src
>
> amd some do
>
> class_eval src, __FILE__, __LINE__
>
> What exactly is the difference and why should I use one over the
> other?
>
> Thanks for your help.

raise an error inside the eva'd code and see

a @ http://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama