Actions
Bug #13180
closed'superclass mismatch for class' on nested classes
Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15]
Description
I've been seeing the following errors when attempting to run different ruby projects.
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/digest.rb:57:in `<class:Digest>': superclass mismatch for class Digest (TypeError)
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/digest.rb:16:in `<module:OpenSSL>'
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/digest.rb:15:in `<top (required)>'
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl.rb:19:in `require'
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl.rb:19:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.4.0/gems/redis-3.3.3/lib/redis/connection/ruby.rb:8:in `require'
from /usr/local/lib/ruby/gems/2.4.0/gems/redis-3.3.3/lib/redis/connection/ruby.rb:8:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.4.0/gems/redis-3.3.3/lib/redis/connection.rb:9:in `require'
from /usr/local/lib/ruby/gems/2.4.0/gems/redis-3.3.3/lib/redis/connection.rb:9:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.4.0/gems/redis-3.3.3/lib/redis.rb:2775:in `require'
from /usr/local/lib/ruby/gems/2.4.0/gems/redis-3.3.3/lib/redis.rb:2775:in `<top (required)>'
from /Users/adam/src/banno/banno-utility-belt/lib/sneakily_grant_auth.rb:2:in `require'
from /Users/adam/src/banno/banno-utility-belt/lib/sneakily_grant_auth.rb:2:in `<top (required)>'
from /Users/adam/src/banno/banno-utility-belt/libexec/bub-api.rb:2:in `require'
from /Users/adam/src/banno/banno-utility-belt/libexec/bub-api.rb:2:in `<top (required)>'
from /Users/adam/bin/bub:19:in `load'
from /Users/adam/bin/bub:19:in `block in <main>'
from /Users/adam/bin/bub:19:in `each'
from /Users/adam/bin/bub:19:in `<main>'
I get a similar error with the Cipher class also.
/usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:64:in `<class:Cipher>': superclass mismatch for class Cipher (TypeError)
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:16:in `<module:OpenSSL>'
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:15:in `<top (required)>'
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl.rb:17:in `require'
from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl.rb:17:in `<top (required)>'
I was able to get my programs to run by commenting out line 57 in digest.rb and line 64 in cipher.rb. For reference, the lines were:
cipher.rb: class Cipher < Cipher; end
digest.rb: class Digest < Digest; end # :nodoc:
I tried for a few minutes to reproduce this with the following, but was unable to see the error. (Running the file through ruby produced no error.)
class Foo
class Foo < Foo; end
end
Actions
Like0
Like0Like0Like0