jruby/jruby — pull request #1143 by dmarcotte (2013-10-21 15:48:38+00:00)
Title: Improve consistency/correctness of arg handling

In #928, I noted that args probably needed to be prepped pretty broadly. This pull accomplishes that, employing RubyProc.prepareArgs at the entry points in BlockBody.

This involves migrating many calls to pass an IRubyObject[] of args rather than prematurely wrapping that array in a RubyArray (which made it impossible for deeper calls to determine if they have one Array arg, or multiple args).

This change has a few nice side effects:
* JavaInternalBlockBody now gets correct arg treatment, and can be used to get RubyEnumerable cleaner and fully rubyspec-compliant
* A number of unneeded allocations are eliminated
* Opens up possibilities to simplify general arg handling even further from here (i.e. perhaps we can get rid of the "aValue" parameter that is passed in a bunch of places? Are any other other helpers which massage block args now redundant?)

I know master Travis is red right now, but you can see a clean run of this branch (pre-rebase) against a fairly recent master [here](https://travis-ci.org/dmarcotte/jruby/builds/12800757).

Also note: I know pull requests which refactor a bunch of critical path code are kind of a pain. This is the result of an experiment on my part, and the result seems solid so I thought I'd share, but I won't be put out in the least if we find reasons not to merge.