ruby / stringio

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

Alias .string to .to_s #102

Closed sebyx07 closed 2 months ago

sebyx07 commented 2 months 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 2 months ago

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

sebyx07 commented 2 months ago

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