Bug #11469
closedArgumentError: wrong number of arguments (-1 for 1)
Description
I got an exception saying ArgumentError: wrong number of arguments (-1 for 1)
. Obviously, -1
is not a valid number of arguments, so I consider this a bug.
Unfortunately, I could not find a way to reproduce the issue, but it happened multiple times with the same code. It does, however, work > 99% of the time.
Since our app is not open source, I cannot share all the code. I can however provide the backtrace (attached, also see https://app.honeybadger.io/fault/43434/9dc7feb396670e289e920b514133175e)
The code looks something like:
# Post is an ActiveRecord model
Post.find_or_initialize_by(id: id).update!(
post_id: post_id,
user_id: user.id,
payout: Money.new(100, 'USD')
)
I am sorry for the lack of useful information, if there is any way I can provide more, I am happy to do so.
Files
Updated by awwaiid (Brock Wilcox) over 8 years ago
I traced through the places where this error is raised in ruby, and couldn't find any issues. Could you try on the latest trunk version in case this was inadvertently fixed elsewhere? Any further clues would be great.
Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago
- Status changed from Open to Closed