rubinius/rubinius — pull request #2169 by tsion (2013-02-19 08:07:58+00:00)
Title: Use CompiledCode name in Proc/BlockEnvironment ArgumentErrors

When creating ArgumentErrors in Procs and BlockEnvironments it should use the name of the underlying CompiledCode instead of just defaulting to `__block__` everywhere.

I first noticed this when working on Apricot (a programming language on Rubinius). When I gave functions the wrong number of arguments like `((fn foo []) 1)` I would get a message like:
```
ArgumentError: method '__block__': given 1, expected 0
```

When I expected:
```
ArgumentError: method 'foo': given 1, expected 0
```

After my patch, this works as expected. I didn't need to change all the places where it defaults to `__block__` to achieve this result, but I figured why not while I'm at it? If any of this is a problem, let me know how I can make it better!