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

Remove monkey-patch for Ruby 1.8. #8

Closed
wants to merge 1 commit into from

Conversation

bk2204
Copy link
Contributor

@bk2204 bk2204 commented Jan 25, 2016

The monkey-patch to define String#force_encoding for Ruby 1.8 resulted
in an incompatibility with the json gem, which tries to access the
Encoding class if force_encoding is defined. Remove this monkey-patch
and use a helper function, to_binary, that converts the string to
ASCII-8BIT encoding if encodings are available. The byteslice function,
which was not used, has also been removed.

This fixes issue #7.

The monkey-patch to define String#force_encoding for Ruby 1.8 resulted
in an incompatibility with the json gem, which tries to access the
Encoding class if force_encoding is defined.  Remove this monkey-patch
and use a helper function, to_binary, that converts the string to
ASCII-8BIT encoding if encodings are available.  The byteslice function,
which was not used, has also been removed.
@mcarpenter mcarpenter closed this Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants