Uploaded image for project: 'Clojure'
  1. CLJ-923

Reading ratios prefixed by + is not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: Release 1.4, Release 1.3, Release 1.2
    • Fix versions: Release 1.5
    • Labels:
      None
    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      In general Clojure's number types can be read prefixed with either a +
      or - and this seems to work correctly for reading integers and floats.
      In the case of ratios however things break down when ratios are
      prefixed with a +.

      The ratio pattern in LispReader.java does match on ratios starting
      with both + and - but matchNumber fails on ratios prefixed with +
      because it ends up calling "new BigInteger(m.group(1))" and it turns
      out the constructor for BigInteger has no problems with negative
      numbers but it doesn't like numbers prefixed by a +.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cosmin Cosmin Stejerean
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: