truffleruby icon indicating copy to clipboard operation
truffleruby copied to clipboard

`Encoding::Converter#insert_output` not implemented

Open nirvdrum opened this issue 2 years ago • 2 comments

While working on improving the IRB test suite to run with TruffleRuby with @st0012, we discovered that Encoding::Converter#insert_output isn't implemented. I think this was overlooked because the method spec is empty, meaning we don't have any tags for it.

nirvdrum avatar May 25 '23 15:05 nirvdrum

I'm a bit curious how IRB uses that method. I wish there would be no Encoding::Converter, only String#encode, but maybe that's not enough?

eregon avatar May 26 '23 12:05 eregon

Found it: https://github.com/ruby/irb/blob/fd49135607e25eb3532f3464e7c59345b4001881/lib/irb.rb#L614-L634 Could that be done with String#encode's various options? Maybe with a :fallback Proc? If it's possible, that seems a lot simpler.

eregon avatar May 26 '23 12:05 eregon