janx / chardet2

Universal Encoding Detector
GNU Lesser General Public License v2.1
23 stars 9 forks source link

Latin1Prober.rb monkey patches Enumerable in an incompatible way #3

Closed valo closed 11 years ago

valo commented 11 years ago

This reduce implementation is not compatible with the original reduce signature in ruby 1.8.7

def reduce(fn, res)
    each { |n| res = res.send(fn, n) }
    res
end
fotanus commented 11 years ago

Pull request #6 fix this. Also note that the gem name is chardet2 (check the updated readme)