ruby / stringio

Pseudo `IO` class from/to `String`.
BSD 2-Clause "Simplified" License
36 stars 26 forks source link

Support encoding keyword in initialize (JRuby) #45

Closed headius closed 1 year ago

headius commented 1 year ago

This PR will add support for the encoding keyword to initialize in the JRuby extension.

Unfortunately there appears to be no tests for this behavior, so adding some may have to be part of this work.

headius commented 1 year ago

@hsbt Has this repository been synced with the CRuby repository recently?

hsbt commented 1 year ago

@headius Yes, they are completely same files with ruby/ruby HEAD.

kou commented 1 year ago

@headius Should we merge this for a new release?

headius commented 1 year ago

Yes this can be merged and released. I had wanted to add some tests for the encoding behavior but never got around to it.

headius commented 1 year ago

Merging this was perhaps a little premature but it does not hurt anything and allows the encoding keyword to be passed without error. There's still work to be done to hook up the encoding to all of the I/O methods, but without tests for that behavior it's hard to know whether I'm implementing it right. In any case, I will handle the additional work myself and it's not necessary for this release.