rubinius/rubinius — pull request #2369 by LTe (2013-05-31 10:34:38+00:00)
Title: Binding self context

Ruby 1.8.x uses the receiver of #binding as self in the binding.

```ruby
Kernel.eval("self") => Kernel
Kernel.binding.eval("self") => Kernel
eval("self") => main
binding.eval("self") => main
```

Ruby 1.9.x uses the current call context as self in the binding.

```ruby
Kernel.eval("self") => Kernel
Kernel.binding.eval("self") => main # difference
eval("self") => main
binding.eval("self") => main
```

In case when we execute binding where caller is Kernel, self of binding
is 'Kernel' (this is valid for ruby 1.8). But for 1.9 self of binding
when caller is Kernel should be self from current context.

```ruby
Kernel.binding.self == self # valid for ruby 1.9
Kernel.binding.self == Kernel # valid for ruby 1.8
```

When you call #eval method, binding is created dynamically and self of
binding is in this case Kernel.