ruby / ruby/irb

Support C-method source in `show_source` command

Open
#664 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Ruby
Stars
478
Forks
158
Avg merge
1d 12h
Merged PRs (30d)
12

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by deciding whether irb, rdoc, or another tool owns C-method source acquisition, then resolve how ruby-install, ruby-build -k, and pry-doc source locations affect the supported scope and which Ruby versions should be handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.