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 redefinition of Enumberable#reduce #6

Merged
merged 1 commit into from
May 17, 2013
Merged

Conversation

fotanus
Copy link
Contributor

@fotanus fotanus commented May 17, 2013

The code currently refines Enumerable#reduce, which is now standard on ruby 2.0.0. The redefinition is not compatible with the canonical one. Of course, this is causing problems.

For example, running a rails console:

Loading development environment (Rails 3.2.13)
2.0.0dev :001 > [].reduce({}, :merge)
 => {} 
2.0.0dev :002 > require 'UniversalDetector'
 => true 
2.0.0dev :003 > [].reduce({}, :merge)
 => :merge 

This patch remove the redefinition and change the only usage of this method to be compatible with ruby 2.0.0.

If possible, consider pushing a new version for this fix.

janx pushed a commit that referenced this pull request May 17, 2013
Remove redefinition of `Enumberable#reduce`
@janx janx merged commit b725461 into janx:master May 17, 2013
@janx
Copy link
Owner

janx commented May 17, 2013

@fotanus I bumped the version to v1.0.0 and published it on rubygems.org for easier use. I changed the gem name to chardet2 because I have no control to the unmaintained chardet gem. I put you and Hui in authors 😄

Thanks!

@fotanus
Copy link
Contributor Author

fotanus commented May 17, 2013

Great, thank you!

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