Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Fix 4.1 adapter under Rubinius #351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chewi
Copy link

@chewi chewi commented Nov 26, 2014

Calling return inside a block under Rubinius results in aLocalJumpError, at least with version 2.3.0. This is probably a Rubinius bug but it is easy enough to work around it here.

I am making the assumption that accept! will never return nil. Is that reasonable?

Unfortunately one other spec still fails but I don't think it's Squeel's fault. It's something to do with preloading HABTM associations, possibly caused by the Rubinius implementation of flat_map.

Calling return inside a block under Rubinius results in a
LocalJumpError, at least with version 2.3.0. This is probably a
Rubinius bug but it is easy enough to work around it here.
@ernie
Copy link
Contributor

ernie commented Nov 26, 2014

@bigxiang FWIW, I'm not a fan of merging these kinds of alternative-Ruby fixes if they're for a bug in the interpreter. The change here (calling break) is very odd-looking for standard Ruby, and would confuse people (it confused me when I saw it). But you're got the reins, now, so do as you will. ;)

@chewi
Copy link
Author

chewi commented Nov 26, 2014

each + break might have been slightly less confusing than find + break but each returns the array rather than nil when it reaches the end.

@chewi
Copy link
Author

chewi commented Nov 26, 2014

I've reported the issue to Rubinius at rubinius/rubinius#1312.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants