Invalid macro definition in cbson.c

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • 12_01_17
    • Affects Version/s: 1.8.5
    • Component/s: None
    • None
    • Environment:
      MacRuby
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The following macro in cbson.c is incorrect:

      // rubinius compatibility
      #ifndef RREGEXP_OPTIONS
      #define RREGEXP_OPTIONS(r) RREGEXP(value)>ptr>options
      #endif

      The "r" parameter is not used and the macro incorrectly reverences "value". The only reason this works in the code is by chance the value passed in for "r" happens to be "value". "value" should be replaced with "r" in the macro.

            Assignee:
            Brandon Black (Inactive)
            Reporter:
            John Kopcke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: