Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix superclass mismatch for class StringIO #62

Merged

Conversation

kou
Copy link
Contributor

@kou kou commented May 21, 2015

% ruby -I lib -r ffi_yajl/ffi -r stringio -e ''
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': superclass mismatch for class StringIO (TypeError)
        from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'

@lamont-granquist
Copy link
Contributor

don't you need a class StringIO < Data later along with the corresponding patch to the c extension?

@kou
Copy link
Contributor Author

kou commented May 25, 2015

don't you need a class StringIO < Data later along with the corresponding patch to the c extension?

It's not needed. We don't need to specify parent class when we open defined class:

require "stringio"

class StringIO
end

p StringIO.ancestors # => [StringIO, IO::generic_writable, IO::generic_readable, Enumerable, Data, Object, Kernel, BasicObject]

@kou
Copy link
Contributor Author

kou commented May 25, 2015

FYI: It's a good manner that we use require "date" instead of class DateTime < Date.

@lamont-granquist
Copy link
Contributor

ah, cool, you want to fix that one as well and rebase?

    % ruby -I lib -r ffi_yajl/ffi -r stringio -e ''
    /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': superclass mismatch for class StringIO (TypeError)
            from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
@kou kou force-pushed the fix-superclass-mismatch-for-stringio branch from 4921559 to d325b92 Compare May 26, 2015 23:28
@kou
Copy link
Contributor Author

kou commented May 26, 2015

ah, cool, you want to fix that one as well and rebase?

Done.

@lamont-granquist
Copy link
Contributor

Cool, I think it may need to be moved up a level and also fixed in the c-extension, but can shave that yak another day.

lamont-granquist added a commit that referenced this pull request May 27, 2015
Fix superclass mismatch for class StringIO
@lamont-granquist lamont-granquist merged commit 92fe69e into chef:master May 27, 2015
@kou kou deleted the fix-superclass-mismatch-for-stringio branch May 28, 2015 00:56
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants