Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2094

Formalize integer options on regular expressions

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • 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@mongodb.com Neil Shweky (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: