-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JRuby 1.7.10 (1.9) convertToType exception when calling Enumerable#grep #1330
Comments
Hey @jasonhutchens, trying to track this down for you, but having some trouble reproducing. Are you able to provide some code that demonstrates the problem? (It can even be something fairly complicated in a repo I could fork if that easiest for you). Also: can you post the backtrace from the error? Thanks in advance! Looking forward to getting to the bottom of this... |
Thanks @dmarcotte! Yes, I knew this would be hard to reproduce; it's going to take me a bit of effort to boil it down to something I can share methinks. I was hoping I could short-cut having to do that. Anyway, let me have a go at putting together a repo that demonstrates the issue. Cheers :) |
Thanks @jasonhutchens, and sorry to put you to work :) In the meantime, can you paste the backtrace from the error that your specs are giving? There's at least a chance I'll be able to deduce something from that, potentially saving you the trouble of setting up a repro. |
Sure; see below. Note that the last line of our code in the backtrace,
|
Thanks for posting this @jasonhutchens. Unfortunately, I'm so far still unable to deduce the problem (though perhaps someone else will be inspired), so hopefully you're able to put together a repro. Really looking forward to figuring out what's going on here... |
Thanks @dmarcotte for looking at this; will post again once I have a sharable repro repo ;) |
Sorry for going dark on this @dmarcotte; I can confirm that the issue still exists under 1.7.10, but I don't have the time at the moment to prepare a repro :( |
Thanks for checking in @jasonhutchens, and no worries on the no-repro yet. Totally understand time constraints. Note that there's no expiry date on a repro being awesome. So as long as this is an issue, if you are able to put something together at any point, it would be fantastic no matter how much time has passed. And it helps to know it's still outstanding on 1.7.10. Keep me posted on how future versions behave, and if you get a chance to try it out on master, it would be great to know if this also manifests there (if you're using rvm, "rvm use jruby-head" is probably the easiest way to check that). |
any word whether this is still relevant in latest JRuby 1.7.x or a way to reproduce the issue? |
No, our app is no longer on JRuby and so I will not be able to repro this issue, and don't know whether it's still relevant. |
For folks in the future -- I just ran into this bug with jruby-1.7.22 -- and it came up when making an |
@kevinmtrowbridge could you pls try for us if it exhibits on latest 1.7 (1.7.26) - in that case would re-open |
@kares: apologies that it took me a while to try with 1.7.26. However, I did today, and I can confirm that it does not happen for me with 1.7.26 whereas it very much does happen with 1.7.22. So that's pretty cool. This can perhaps be definitively closed. |
Thanks Kevin for the feedback. This stays closed (resolved somewhere along the line) than ... |
We're currently running a large Rails (3.2.12) app under JRuby 1.7.4 (1.8), and I'm in the process of updating to Rails 3.2.16 / JRuby 1.7.9 (1.9). Unfortunately we're hitting an issue in some of our specs.
Specifically, we're getting a
NilClass#to_ary should return Array
exception for some specs that call#count
on an ActiveRecord query. This bottoms out inActiveRecord::Calculations#perform_calculation
, in the following code:Now,
arel.ast
returns aArel::Nodes::SelectStatement
, which is anEnumerable
and is not to be confused with an abstract syntax tree :)It seems that the JRuby implementation of
Enumerable#grep
, for someArel::Nodes::SelectStatement
instances, causes the aforementionedto_ary
exception.It should be noted that the specs pass under MRI 1.9.3, and that they also pass if I change the above code to do
arel.ast.to_a.grep
instead.Any suggestions about what I can do to pinpoint the underlying cause of this issue? It would be nice if this sets of lightbulbs with someone who can help us, but right now I need some direction about what I can do to narrow things down to the root cause. Cheers!
The text was updated successfully, but these errors were encountered: