jruby/jruby — pull request #255 by ryenus (2012-08-08 06:24:44+00:00)
Title: JRUBY-6510 fix String.encode!

This is to fix issue [JRUBY-6510] (https://jira.codehaus.org/browse/JRUBY-6510)

In the past, when there's only 1 argument to `String#encode!`, the argument was always treated as the target encoding to `transcode` to.

This is wrong, because, when the only argument is a hash, it should be treated as the option for `transcode`, not the target encoding.

btw, I renamed the variable name in the other unbang encode method to align with the argument name in transcode.