-
Type: Improvement
-
Resolution: Fixed
-
Priority: Trivial - P5
-
Affects Version/s: 2.7.1
-
Component/s: None
-
Environment:ruby 2.6.1
-
Fully Compatible
Currently the driver produces a number of warnings when run with `ruby -w`. For example, simply loading the driver produces the following output:
speed% irb -Ilib -rmongo -w /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bson-4.4.2/lib/bson/decimal128/builder.rb:187: warning: assigned but unused variable - original /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bson-4.4.2/lib/bson/decimal128/builder.rb:188: warning: assigned but unused variable - e /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bson-4.4.2/lib/bson/decimal128/builder.rb:189: warning: assigned but unused variable - decimal /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bson-4.4.2/lib/bson/decimal128/builder.rb:315: warning: assigned but unused variable - base /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bson-4.4.2/lib/bson_native.so: warning: method redefined; discarding old next_object_id /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bson-4.4.2/lib/bson/object_id.rb:356: warning: previous definition of next_object_id was here /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/mongo-2.8.0/lib/mongo/cluster/topology/base.rb:81: warning: assigned but unused variable - address_str /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/mongo-2.8.0/lib/mongo/cluster/sdam_flow.rb:317: warning: assigned but unused variable - address_strs /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/mongo-2.8.0/lib/mongo/server/connection.rb:223: warning: assigned but unused variable - rtt /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/mongo-2.8.0/lib/mongo/server/monitor.rb:234: warning: assigned but unused variable - average_rtt /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/mongo-2.8.0/lib/mongo/uri.rb:221: warning: assigned but unused variable - remaining /home/w/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/mongo-2.8.0/lib/mongo/uri.rb:819: warning: mismatched indentations at 'end' with 'def' at 811 irb(main):001:0>
There are other warnings produced by the driver including the following:
in sdam_flow.rb, line 416, there is a check against @need_topology_changed_event, but that variable isn't always initialized, which results in a warning:
"lib/mongo/cluster/sdam_flow.rb:416: warning: instance variable @need_topology_changed_event not initialized"
- is related to
-
RUBY-2035 Use URI::DEFAULT_PARSER.unescape instead of URI.decode for Ruby 2.7
- Closed
- related to
-
DRIVERS-959 Connection string spec does not define how to "URL decode"
- Backlog