From: adamkshannon@... Date: 2017-02-01T20:42:20+00:00 Subject: [ruby-core:79383] [Ruby trunk Bug#13180] 'superclass mismatch for class' on nested classes Issue #13180 has been reported by Adam Shannon. ---------------------------------------- Bug #13180: 'superclass mismatch for class' on nested classes https://bugs.ruby-lang.org/issues/13180 * Author: Adam Shannon * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- 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 `': superclass mismatch for class Digest (TypeError) from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/digest.rb:16:in `' from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/digest.rb:15:in `' 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 `' 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 `' 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 `' 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 `' 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 `' 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 `' from /Users/adam/bin/bub:19:in `load' from /Users/adam/bin/bub:19:in `block in
' from /Users/adam/bin/bub:19:in `each' from /Users/adam/bin/bub:19:in `
' ~~~ 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 `': superclass mismatch for class Cipher (TypeError) from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:16:in `' from /usr/local/Cellar/ruby/2.4.0/lib/ruby/2.4.0/openssl/cipher.rb:15:in `' 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 `' ~~~ 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 ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: