ruby / ruby/rdoc

Missing constants possibly related to mixed c/rb and nested classes

Open
#399 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

Minimal test case to reproduce:

Create two files,

async.rb:

class Xmms::Collection::Async
end

collection.c:

void
Init_Collection()
{
    mXmms = rb_define_module("Xmms");

    cColl = rb_define_class_under(mXmms, "Collection", rb_cObject);

    /* Document-const: Xmms::Collection::NS_ALL
     *
     * I am documentation */
    rb_define_const(cColl, "NS_ALL", rb_str_new2(XMMS_COLLECTION_NS_ALL));
}

Build with:
rdoc async.rb collection.c

And notice the lack of the NS_ALL constant.

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

Reproduce the issue with the shown async.rb and collection.c files using rdoc async.rb collection.c, then inspect how RDoc combines Ruby nested classes with C extension declarations. Done means the generated documentation includes the documented Xmms::Collection::NS_ALL constant.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ruby
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.