Use encoding objects for comparison instead of encoding names (#2418)
Use encoding objects for comparison instead of encoding names (#2418)

* Stop checking encoding names

Comparing the names is much less efficient than
comparing the instance directly.

It may also change in the future: https://bugs.ruby-lang.org/issues/18576

* fix one assertion

Co-authored-by: Oleg Pudeyev <e6fb06210fafc02fd7479ddbed2d042cc3a5155e@olegp.name>
mongodb/mongo-ruby-driver,mongodb/mongo-ruby-driver,mongodb/mongo-ruby-driver