> (I don't write Ruby so I don't know if this is overloadable somewhere.)
Ruby allows overriding the == operator[1], but OpenSSL::HMAC.digest returns an instance of String[2], rather than returning a special subclass of string or some other kind of special HMAC-representing class overloading ==.
[1] http://docs.ruby-lang.org/en/2.2.0/syntax/methods_rdoc.html#...
[2] http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/OpenSSL...