From: Ryan Davis Date: 2011-06-08T18:13:45+09:00 Subject: [ruby-core:36838] Re: [Ruby 1.9 - Feature #4824] Provide method Kernel#executed? On Jun 8, 2011, at 00:44 , Charles Oliver Nutter wrote: > I might be more inclined to a keyword or pseudo constant along the > lines of __FILE__, like __MAIN__ that produces true iff __FILE__ == > $0. Something we can statically determine before runtime without > digging around in the caller's frame. While I think the feature request is a bit inane to begin with, I think __MAIN__ is a beautifully pragmatic compromise. Easy to implement on all impls, non-hacky, and yet makes its intention very clear.