Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You appear to be shadow banned. Letting you know since I didn't see anything egregious on a quick scan. Maybe contact HN and plead your case.

I vouched for your reply below, and to answer in the meantime:

Yes, it's runtime, but that only matters if your code can't be initialized without unacceptable side effects.

In which case you don't have a functioning test suite either, and have much larger problems.

Otherwise, just load the code you struggle to figure out into irb, or pry, or a simple test script, and print out source-location.

If that is impossible (aside from the fact that codebase is broken beyond all reason), the marginally harder solution is to use ruby-lsp[1] and look up the definitions.

This is only hard if you insist on refusing to use the available - and built in, in the case of source_location - tooling.

1: https://shopify.github.io/ruby-lsp/

 help



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: