# Binding of caller in Ruby 1.9

**URL:** <https://www.ruby-forum.com/t/binding-of-caller-in-ruby-1-9/134460>\
**Category:** Ruby\
**Created:** [April 11, 2008, 1:40am UTC](https://www.ruby-forum.com/t/binding-of-caller-in-ruby-1-9/134460 "2008-04-11T01:40:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sevensoft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Post date:** [April 11, 2008, 1:40am UTC](https://www.ruby-forum.com/t/binding-of-caller-in-ruby-1-9/134460/1 "2008-04-11T01:40:48Z")

</div>

Does anybody know of a way to get access in Ruby 1.9 to the binding of  
the caller of the function that’s currently executing?

–Ken

---

<div class="post-metadata">

**Author:** ![sevensoft](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Post date:** [April 11, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/binding-of-caller-in-ruby-1-9/134460/2 "2008-04-11T17:11:38Z")

</div>

On Fri, Apr 11, 2008 at 08:40:08AM +0900, Ken B. wrote:

> Does anybody know of a way to get access in Ruby 1.9 to the binding of  
> the caller of the function that’s currently executing?

Pass it in explicitly:

foo(arg1, arg2, binding)

Being able to get the binding of the caller prevents desirable  
optimizations.

Paul
