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

Stop duplicating Time instances

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.15.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change

      In https://jira.mongodb.org/browse/RUBY-1752 a workaround was added for applications that returned frozen Time objects from Time.now (via mocks).

      Such behavior is not how the standard library Time.now works, hence the driver shouldn't be working around it.

      RSpec provides a pattern for returning new values:

      expect(object).to receive(:method) { value.dup }
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: