Sunday, September 23, 2007

The running program

sometimes it can come handy to be able to know in which program you are running know.
it can be useful when displaying error information or such.

  1. caller(0)[0].split(".rb")[0]  >>  "(irb):74:in `irb_binding'"  

No comments:

Post a Comment

Tell me what you think