{"record":{"id":"63ec785ee046ae50","repo":"flippercloud/flipper","slug":"value-inspect-cannot-be-converted-to-an-integer","errorCode":null,"errorMessage":"#{value.inspect} cannot be converted to an integer","messagePattern":"#(.+?) cannot be converted to an integer","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/flipper/typecast.rb","lineNumber":28,"sourceCode":"      'true'  => true,\n      '1'     => true,\n    }.freeze\n\n    # Internal: Convert value to a boolean.\n    #\n    # Returns true or false.\n    def self.to_boolean(value)\n      !!TRUTH_MAP[value]\n    end\n\n    # Internal: Convert value to an integer.\n    #\n    # Returns an Integer representation of the value.\n    # Raises ArgumentError if conversion is not possible.\n    def self.to_integer(value)\n      value.to_i\n    rescue NoMethodError\n      raise ArgumentError, \"#{value.inspect} cannot be converted to an integer\"\n    end\n\n    # Internal: Convert value to a float.\n    #\n    # Returns a Float representation of the value.\n    # Raises ArgumentError if conversion is not possible.\n    def self.to_float(value)\n      value.to_f\n    rescue NoMethodError\n      raise ArgumentError, \"#{value.inspect} cannot be converted to a float\"\n    end\n\n    # Internal: Convert value to a number.\n    #\n    # Returns a Integer or Float representation of the value.\n    # Raises ArgumentError if conversion is not possible.\n    def self.to_number(value)\n      case value","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/typecast.rb#L10-L46","documentation":"Error \"#{value.inspect} cannot be converted to an integer\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/typecast.rb:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an Integer or a numeric String; other types cannot be typecast","Convert the value yourself (to_i) before passing it to Flipper","Check the source of the value; nil or arbitrary objects are rejected"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f86de3ec91521585b156445e156642938b19cb0","analyzedAt":"2026-08-23T04:36:09.896Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}