{"record":{"id":"77e7d4a15882c031","repo":"RubyMoney/money","slug":"unsupported-argument-type-other-class-name","errorCode":null,"errorMessage":"Unsupported argument type: #{other.class.name}","messagePattern":"Unsupported argument type: #(.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"lib/money/money/arithmetic.rb","lineNumber":161,"sourceCode":"        \"Can't add or subtract a non-zero #{value.class.name} value\"\n      end\n\n      define_method(op) do |other|\n        case other\n        when Money\n          other = other.exchange_to(currency)\n          new_fractional = fractional.public_send(op, other.fractional)\n          dup_with(fractional: new_fractional)\n        when CoercedNumeric\n          raise TypeError, non_zero_message.call(other.value) unless other.zero?\n\n          dup_with(fractional: other.value.public_send(op, fractional))\n        when Numeric\n          raise TypeError, non_zero_message.call(other) unless other.zero?\n\n          self\n        else\n          raise TypeError, \"Unsupported argument type: #{other.class.name}\"\n        end\n      end\n    end\n\n    # Multiplies the monetary value with the given number and returns a new\n    # +Money+ object with this monetary value and the same currency.\n    #\n    # Note that you can't multiply a Money object by an other +Money+ object.\n    #\n    # @param [Numeric] value Number to multiply by.\n    #\n    # @return [Money] The resulting money.\n    #\n    # @raise [TypeError] If +value+ is NOT a number.\n    #\n    # @example\n    #   Money.new(100) * 2 #=> #<Money @fractional=200>\n    #","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/RubyMoney/money/blob/26e2829c34f165847040a5a40d4d2daa5eb72927/lib/money/money/arithmetic.rb#L143-L179","documentation":"Error \"Unsupported argument type: #{other.class.name}\" thrown in RubyMoney/money.","triggerScenarios":"Thrown at lib/money/money/arithmetic.rb:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26e2829c34f165847040a5a40d4d2daa5eb72927","analyzedAt":"2026-08-23T17:41:07.306Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}