We are switching a rails app to JRuby, and some of our tests fail
intermittently because we call #entries on an Enumerable (Array or
Rails association), and it throws an exception saying 1 parameter was
expected (not zero).
Switching #entries to #to_s seems to fix it.
Sorry there’s not a better bug report with more info, we haven’t
gotten the debugger to work under JRuby yet either :). Mainly just
wondering if anyone has seen this, and if I should open a bug report
even with this vague description.
This is 1.4.0RC1, Rails 2.2.2.
Thanks,
– Chad
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Tue, Oct 6, 2009 at 11:30 AM, Chad W. [email protected]
wrote:
Switching #entries to #to_s seems to fix it.
…err, i mean to_a
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
RubyEnumerable contains two methods with different signature:
@JRubyMethod(name = {"to_a", "entries"}, required = 1, rest = true)
public static IRubyObject to_a19(ThreadContext context, IRubyObject
self, IRubyObject[]args) {
and
@JRubyMethod(name = {"to_a", "entries"})
public static IRubyObject to_a19(ThreadContext context, IRubyObject
self) {
But I don’t know why jruby ignores the second signature and uses the
first
one with your code.
So just to make this totally clear. You are saying that you do not
consistently get same error in the same place about this problem?
I can certainly fix this by consolidating our two separate annotations
into a single one, but I am at a loss why this would not be an all or
nothing problem…
-Tom
On Tue, Oct 6, 2009 at 1:30 PM, Chad W. [email protected]
wrote:
even with this vague description.
–
blog: http://blog.enebo.com twitter: tom_enebo
mail: [email protected]
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Wed, Oct 7, 2009 at 5:41 AM, David C.
[email protected] wrote:
RubyEnumerable contains two methods with different signature:
These appear to be binding correctly. The generated invoker class
(org.jruby.RubyEnumerable$s_method_multi$RUBYINVOKER$to_a19.class)
appears to pass zero args through just fine. So I suspect that there’s
some other “entries” method on another class, possibly something in
rails, that’s not getting arguments correctly in some cases.
Chad: I’d say open the bug report and try to get a backtrace of some
kind so we can see where it’s happening.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email