Project

General

Profile

Actions

Bug #11469

closed

ArgumentError: wrong number of arguments (-1 for 1)

Added by nd (Niko Dziemba) over 8 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

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

backtrace.txt (3.74 KB) backtrace.txt Exception backtrace nd (Niko Dziemba), 08/20/2015 08:56 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0