rubinius/rubinius — pull request #1868 by IPGlider (2012-08-17 20:43:01+00:00)
Title: Fix BlockArgument bytecode generation

After fixing an error in the parser in d4b690105b an error in the bytecode generated arose.

I used the following code as a test case and 1.9 mode.

```ruby
class A
def test(*args, &block)
puts 'class ' + self.class.to_s
block.call if block
end
end

class B
def initialize
@a = A.new
end

def method_missing(method, *args, &block)
self.class.send :define_method, method do |*args, &block|
@a.send method, *args, &block
end

send method, *args, &block
end
end

b = B.new
b.test { puts "!!!" }
```

The diff is self-explanatory.

I'm doing a pull request because I don't know how to write an spec for this and don't want to push without it, so it will be nice if someone can point me to a way to do the spec or write the spec.