Bug #16649: Object with [] method doesn't work as String#encode's fallback - Ruby master - Ruby Issue Tracking System
Redmine