ruby / stringio

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

Alias .string to .to_s #102

Closed sebyx07 closed 2 weeks ago

sebyx07 commented 1 month ago

imo, a lot of users would rather call buffer.to_s instead of the .string method, nobody atm depends on the .to_s. There already is .inspect that behaves like the current to_s

https://bugs.ruby-lang.org/issues/20703?next_issue_id=20702

I can do a pr, but lmk if it's a good idea

kou commented 1 month ago

I'm not sure whether the change is safe or not but let's try.

sebyx07 commented 3 weeks ago

also added .to_str https://bugs.ruby-lang.org/issues/20703