This is to fix issue 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.
spec for JRUBY-6510
check if arg is hash when it is the only arg to String#encode!
This one got lost in the shuffle. Can you re-push a version that applies to master and collapse your commits into one?
sure, I'll close this one and make a new PR
Just to make the story complete, the patch is resubmitted with pull request #255: #255