Skip to content

Support C-method source in show_source command #664

@st0012

Description

@st0012

The main challenge of this support comes from acquiring the C-method source files:

  • Unless users install Ruby with ruby-install or ruby-build -k, Ruby's C source code wouldn't be preserved after Ruby is built
  • Between ruby-install and ruby-build -k, the location of sources are different:
    • ruby-install: ~/src or /usr/local/src for the root user
    • ruby-build -k: ~/.cache
  • Pry uses pry-doc to 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions