Changeset [3cb3f05483a185f02c3483f3af0d9d6f8e577858] by Dan Kubb

February 3rd, 2013 @ 12:57 AM

Fix code that breaks under rbx in 1.9 mode

  • For some reason specifying the arguments precisely allows for the correct arguments to be passed through. For some reason the original code causes an arity error, because only the key is passed through.

    I assume this is due to a bug inside the rbx parser, but I was not able to narrow it down further. To reproduce this error, use the parent commit and run the following:

    GIT_BRANCH=release-1.2 ruby -X19 -S bundle exec spec spec/public//associations/many_to_many_spec.rb

    The most interesting thing is that this error doesn't occur the first time the method is accessed. If you do a full spec, run the method is clearly called multiple times, and then something happens inside rbx that changes the arguments yielded into the block. https://github.com/datamapper/dm-core/commit/3cb3f05483a185f02c3483...

Committed by Dan Kubb

  • M lib/dm-core/query.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »