This post originated from an RSS feed registered with Ruby Buzz
by Eigen Class.
Original Post: Cheaper alternative to Binding.of_caller
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Here's a trick to modify local variables in the caller scope without using
Binding.of_caller. It's not as general, but much faster when it applies (when
you're using a "literal" block):