How can I get the callers __LINE__ and __FILE__?

I want a version of “pp” that prints the file/line, so I tried this:

def debug(*objs)
print FILE, ‘:’, LINE, ':'
pp(*objs)
end

Obviously, this doesn’t work, it always gives the file/line of
debug()…

How do I get my callers LINE and FILE?

And yes, I know there are half-dozen debug/log printers on RAA… but
none seem to have the combination I want:

  • to have printed expressions be formatted with PP
  • to have the file/line in the output

or am I wrong? I don’t need to reinvent this particular wheel!

Sam