diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-28 14:29:12 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-06-28 14:51:49 +0900 |
commit | 51be2cf6d23466e173ad66eac9a4b3ae32097cc4 (patch) | |
tree | d4be3f0ffc5f5b571f0c07cb1d017752b9eab8ac /test/rdoc | |
parent | aba804ef91a5b2aa88efdd74205026aca3f943b2 (diff) |
[ruby/rdoc] Parse also InitVM-prefixed functions
Initialization depending on VM is separated.
https://github.com/ruby/rdoc/commit/030d10fccd
Diffstat (limited to 'test/rdoc')
-rw-r--r-- | test/rdoc/test_rdoc_parser_c.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rdoc/test_rdoc_parser_c.rb b/test/rdoc/test_rdoc_parser_c.rb index c7312bebba..b7e1648cd6 100644 --- a/test/rdoc/test_rdoc_parser_c.rb +++ b/test/rdoc/test_rdoc_parser_c.rb @@ -857,6 +857,23 @@ Init_Foo(void) { assert_equal "a comment for class Foo", klass.comment.text end + + def test_find_class_comment_initvm + content = <<-EOF +/* + * a comment for class Foo + */ +void +InitVM_Foo(void) { + VALUE foo = rb_define_class("Foo", rb_cObject); +} + EOF + + klass = util_get_class content, 'foo' + + assert_equal "a comment for class Foo", klass.comment.text + end + def test_find_class_comment_define_class content = <<-EOF /* |