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

Supress Noisy Warnings in 1.x Driver

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: 1.8.6
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • # Replies:
      3
    • Last comment by Customer:
      true

      Description

      When running in 'ruby -w' mode there are a few different warnings that popup for the 1.x series of the ruby driver. These currently have no ill-effects but we should try to resolve this so that they don't cause any alarm.

      Steps to reproduce:

      #!/usr/bin/ruby -w
       
      require 'mongo'
      include Mongo
       
      mongo_client = MongoClient.new
      db = mongo_client.db("test")
      coll = db.collection("test_coll")

      Warnings:

      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bson_ext-1.8.6/ext/bson_ext/bson_ext/cbson.bundle: warning: method redefined; discarding old legal?
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bson-1.8.6/lib/bson/types/object_id.rb:39: warning: previous definition of legal? was here
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bson_ext-1.8.6/ext/bson_ext/bson_ext/cbson.bundle: warning: method redefined; discarding old from_string
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bson-1.8.6/lib/bson/types/object_id.rb:107: warning: previous definition of from_string was here
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bson_ext-1.8.6/ext/bson_ext/bson_ext/cbson.bundle: warning: method redefined; discarding old to_s
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/bson-1.8.6/lib/bson/types/object_id.rb:119: warning: previous definition of to_s was here
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/pool_manager.rb:267: warning: mismatched indentations at 'end' with 'def' at 259
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/db.rb:339: warning: assigned but unused variable - e
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/gridfs/grid.rb:24: warning: assigned but unused variable - connection
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/gridfs/grid_file_system.rb:25: warning: assigned but unused variable - connection
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/write_concern.rb:32: warning: instance variable @legacy_write_concern not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/write_concern.rb:32: warning: instance variable @legacy_write_concern not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/write_concern.rb:32: warning: instance variable @legacy_write_concern not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/logging.rb:41: warning: instance variable @instrumenter not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/mongo_client.rb:523: warning: instance variable @max_message_size not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/mongo_client.rb:519: warning: instance variable @max_bson_size not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/mongo_client.rb:519: warning: instance variable @max_bson_size not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/write_concern.rb:32: warning: instance variable @legacy_write_concern not initialized
      /usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.8.6/lib/mongo/util/write_concern.rb:32: warning: instance variable @legacy_write_concern not initialized

        Activity

        Hide
        tyler@10gen.com Tyler Brock (Inactive) added a comment -
        Show
        tyler@10gen.com Tyler Brock (Inactive) added a comment - Pull Request
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}

        Message: RUBY-620 fix unused or uninitialized variables
        Branch: master
        https://github.com/mongodb/mongo-ruby-driver/commit/c767f75137222698febe11f7099d4fe97f96b9cb

        Show
        auto auto (Inactive) added a comment - Author: {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'} Message: RUBY-620 fix unused or uninitialized variables Branch: master https://github.com/mongodb/mongo-ruby-driver/commit/c767f75137222698febe11f7099d4fe97f96b9cb
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}

        Message: RUBY-620 fix unused or uninitialized variables
        Branch: 1.x-stable
        https://github.com/mongodb/mongo-ruby-driver/commit/c767f75137222698febe11f7099d4fe97f96b9cb

        Show
        auto auto (Inactive) added a comment - Author: {u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'} Message: RUBY-620 fix unused or uninitialized variables Branch: 1.x-stable https://github.com/mongodb/mongo-ruby-driver/commit/c767f75137222698febe11f7099d4fe97f96b9cb

          People

          • Assignee:
            tyler@10gen.com Tyler Brock (Inactive)
            Reporter:
            brandon.black@10gen.com Brandon Black (Inactive)
            Participants:
            Last commenter:
            Barrie Segal
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              2 years, 4 weeks ago
              Date of 1st Reply: