irb
irb copied to clipboard
Support C-method source in `show_source` command
The main challenge of this support comes from acquiring the C-method source files:
- Unless users install Ruby with
ruby-installorruby-build -k, Ruby's C source code wouldn't be preserved after Ruby is built - Between
ruby-installandruby-build -k, the location of sources are different:ruby-install:~/srcor/usr/local/srcfor the root userruby-build -k:~/.cache
- Pry uses
pry-docto serve as an installable source database
So instead of relying on the installed CRuby source, downloading the source later may be a better approach (proposed by @k0kubun).
Questions:
- Should it be
rdoc,irb, or another tool's responsibility to perform this action? - Should it install multiple Ruby versions' sources, or just 1?
- I prefer the former, like downloading all actively maintained Ruby versions at once
- TBD