From: niko@... Date: 2015-08-20T09:04:06+00:00 Subject: [ruby-core:70474] [Ruby trunk - Bug #11469] [Open] ArgumentError: wrong number of arguments (-1 for 1) Issue #11469 has been reported by Niko Dziemba. ---------------------------------------- Bug #11469: ArgumentError: wrong number of arguments (-1 for 1) https://bugs.ruby-lang.org/issues/11469 * Author: Niko Dziemba * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.2.2 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- 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) -- https://bugs.ruby-lang.org/