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

Regex options not serialized correctly

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.12.2
    • Affects Version/s: 1.12.1
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I haven't been able to provide an example that can be run easily, but you can observe this by sending a regex query which will scan a lot of records, and then tailing the slow query log.

      Basically, this:

      BSON::Regex.new('a', 0)
      

      will send /a/ as expected, but this:

      BSON::Regex.new('a', 1)
      

      will send /a/ilmsux.

      1 is equivalent to Regexp::IGNORECASE, so I would expect this to send /a/i.

      I'm not ready to upgrade to v2.0 of the driver so I haven't tested with that yet.

            Assignee:
            emily.stolfo Emily Stolfo (Inactive)
            Reporter:
            matt.parlane@gmail.com Matt Parlane
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: