Skip to content

Comment on Letters: A tiny debugging library for Ruby

Comments

Didn't check the code out but it looks like p is something like:

    obj.tap { |x| puts x }

That's the base case. It takes arguments, too, and if you give it a block, it prints out the result of the block called in the receiver's scope.

Why `p` though? That's a method on Kernel already and does puts(args.inspect)

Just changed it. I was hoping people wouldn't mix and match, but I don't mind using `o` instead:

https://github.com/davejacobs/letters/issues/6

Thank you very much.

Cool, looks like a useful library.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.