Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Why use __FILE_, __LINE__ in class_eval?

Reply
Thread Tools

Why use __FILE_, __LINE__ in class_eval?

 
 
Ben Johnson
Guest
Posts: n/a
 
      09-05-2008
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-forum.com/.

 
Reply With Quote
 
 
 
 
ara.t.howard
Guest
Posts: n/a
 
      09-05-2008

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://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
stringification of __LINE__: why two passes? Generic Usenet Account C Programming 5 10-25-2006 07:40 AM
stringification of __LINE__: why two passes? Generic Usenet Account C++ 5 10-25-2006 07:40 AM
can I use __FILE__ ,__LINE__ etc. in a code witout DEBUG defined? baumann.Pan@gmail.com C Programming 5 03-12-2005 12:29 AM



Advertisments