かつてActiveSupportにあったけど、Ruby1.8.5の登場で惜しまれつつ亡くなったBinding.of_callerが、Rubiniusだと簡単に実現できるとか。 # http://gihyo.jp/news/report/01/rubykaigi2008/0001 class Binding def self.of_caller Binding.setup MethodContext.current.sender.sender end end これは早速やってみなければ $ rbx binding_of_caller.rb An exception occurred running binding_of_caller.rb Missing or uninitialized constant: Binding::MethodContext (NameError) Backtra
![RubiniusでBinding.of_caller的な - ずっと君のターン](https://cdn-ak-scissors.b.st-hatena.com/image/square/184dead8fcf06f1dc2daa65163853915d0752682/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Ft%2Ftechnohippy%2F20110106%2F20110106001820.png)