Stop duplicating Time instances

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: