Formalize integer options on regular expressions

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In Ruby, regular expression options are represented as an integer bit mask:

      irb(main):007:0> (/foo/i).options
      => 1
      

      In extended json, options are represented as a sorted alphabetic string.

      BSON::Regexp::Raw claims to accept options as both integers and strings but I am not seeing any code to convert from one representation to another.

      The class should store the options in one of the two formats and convert the other one to the canonical form.

            Assignee:
            Neil Shweky (Inactive)
            Reporter:
            Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: