{"record":{"id":"d487d1efd080801c","repo":"pry/pry","slug":"value-could-not-be-coerced-into-float","errorCode":null,"errorMessage":"#{value} could not be coerced into Float","messagePattern":"#(.+?) could not be coerced into Float","errorType":"validation","errorClass":"InvalidArgumentError","httpStatus":null,"severity":"error","filePath":"lib/pry/slop/option.rb","lineNumber":178,"sourceCode":"          rescue ArgumentError\n            raise InvalidArgumentError, \"#{value} could not be coerced into Integer\"\n          end\n        else\n          value.to_s.to_i\n        end\n      end\n\n      # Convert an object to a Float if possible.\n      #\n      # value - The Object we want to convert to a float.\n      #\n      # Returns the Float value if possible to convert, else a zero.\n      def value_to_float(value)\n        if @slop.strict?\n          begin\n            Float(value.to_s)\n          rescue ArgumentError\n            raise InvalidArgumentError, \"#{value} could not be coerced into Float\"\n          end\n        else\n          value.to_s.to_f\n        end\n      end\n\n      # Convert an object to a Range if possible.\n      #\n      # value - The Object we want to convert to a range.\n      #\n      # Returns the Range value if one could be found, else the original object.\n      def value_to_range(value)\n        case value.to_s\n        when /\\A(\\-?\\d+)\\z/\n          Range.new(Regexp.last_match(1).to_i, Regexp.last_match(1).to_i)\n        when /\\A(-?\\d+?)(\\.\\.\\.?|-|,)(-?\\d+)\\z/\n          Range.new(\n            Regexp.last_match(1).to_i,","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/pry/pry/blob/135640262879544c6bfecbf3e78511289bfe956c/lib/pry/slop/option.rb#L160-L196","documentation":"Error \"#{value} could not be coerced into Float\" thrown in pry/pry.","triggerScenarios":"Thrown at lib/pry/slop/option.rb:178 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":"135640262879544c6bfecbf3e78511289bfe956c","analyzedAt":"2026-08-21T19:07:03.985Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}