deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
pusewic|away_ has quit [Ping timeout: 268 seconds]
kiwiroy has joined #crystal-lang
kevinsjoberg has joined #crystal-lang
pusewic|away_ has joined #crystal-lang
_whitelogger has joined #crystal-lang
greenbigfrog has quit [Ping timeout: 245 seconds]
greenbigfrog has joined #crystal-lang
hightower2 has joined #crystal-lang
HumanG33k has quit [Quit: WeeChat 3.0]
<FromGitter>
<nanobowers> This is probably a dumb question, but i'm unclear how the stdlib works re: `#to_s`: ⏎ ⏎ I'm poking at redefining `inspect` for Tuple, which calls `to_s`. to_s takes an IO param, but inspect never passes it in. https://github.com/crystal-lang/crystal/blob/6d9a1d5830db5f276bf3df37fceeb0d5333e7e14/src/tuple.cr#L430 ⏎ when i redefine inspect to call basically the same function, it doesnt work, so feels
<FromGitter>
<nanobowers> I suppose the crux is that `#inspect` is not explicitly passing an IO object to `#to_s`, so it must be implied from somewhere else
<FromGitter>
<Blacksmoke16> you need to define `def inspect(io : IO) : Nil`
<FromGitter>
<Blacksmoke16> same thing with `to_s`
<FromGitter>
<nanobowers> I think the key is that there was some inheritance in `Object` for the arg-less version of to_s, etc..
<FromGitter>
<Blacksmoke16> the argless versions call the IO versions
<FromGitter>
<Blacksmoke16> of which if you dont override it'll use the inherited version, thus you still see the default output
<FromGitter>
<nanobowers> is there a way to do a `responds_to?` with a particular argument signature?