Hanami::Utils::BasicObject#inspect doesn't output anything
nfilzi opened this issue · comments
Hey guys! I noticed a rather strange issue while trying to implement an interactor in my Hanami application. When the Result object was returned at the end of my interactor run, nothing was displayed in the terminal. By nothing, I do not mean nil
, just plain nothing.
I somehow managed to pinpoint it up to the Hanami::Utils::BasicObject#inspect
method, but I'm stuck on how to fix it, so I can't offer you a nice PR :(
Here's a diff screenshot, where first the inspect
method is enabled, second I just comment it out.
Let me know if you need more extra information!
And thank you for your time 🙇
Hi @nfilzi thanks for the issue, could you provide more info about your interactor?
@nfilzi I played a bit with this problem: for some reason this fails only with Pry. It invokes Hanami::Utils::BasicObject#inspect
, but it does print out the output string of that method.
Apparently Pry doesn't uses #inspect
but #pretty_print
(from Ruby's pp
).
Source: https://stackoverflow.com/a/36664061/498386
It's working like a charm, thanks a lot for the swift fix @jodosha !