bitclust-core 1.3.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -0
  3. data/README.md +65 -0
  4. data/Rakefile +32 -0
  5. data/data/bitclust/catalog/ja_JP.UTF-8 +19 -1
  6. data/data/bitclust/searchpage/index.html +90 -0
  7. data/data/bitclust/template/class +69 -8
  8. data/data/bitclust/template/function +2 -2
  9. data/data/bitclust/template/layout +11 -3
  10. data/data/bitclust/template/method +2 -2
  11. data/data/bitclust/template/search +1 -1
  12. data/data/bitclust/template.epub/class +22 -1
  13. data/data/bitclust/template.epub/function +2 -2
  14. data/data/bitclust/template.epub/layout +1 -3
  15. data/data/bitclust/template.epub/method +2 -2
  16. data/data/bitclust/template.lillia/class +26 -5
  17. data/data/bitclust/template.lillia/layout +1 -3
  18. data/data/bitclust/template.lillia/method +2 -2
  19. data/data/bitclust/template.offline/class +48 -4
  20. data/data/bitclust/template.offline/function +2 -2
  21. data/data/bitclust/template.offline/layout +27 -3
  22. data/data/bitclust/template.offline/method +2 -2
  23. data/lib/bitclust/app.rb +16 -17
  24. data/lib/bitclust/capi_converter.rb +20 -0
  25. data/lib/bitclust/classentry.rb +67 -17
  26. data/lib/bitclust/compat.rb +2 -2
  27. data/lib/bitclust/completion.rb +58 -27
  28. data/lib/bitclust/crossrubyutils.rb +8 -5
  29. data/lib/bitclust/database.rb +28 -8
  30. data/lib/bitclust/doc_converter.rb +63 -0
  31. data/lib/bitclust/docentry.rb +1 -1
  32. data/lib/bitclust/entity_splitter.rb +221 -0
  33. data/lib/bitclust/entry.rb +47 -7
  34. data/lib/bitclust/functiondatabase.rb +13 -1
  35. data/lib/bitclust/functionentry.rb +5 -1
  36. data/lib/bitclust/functionreferenceparser.rb +4 -4
  37. data/lib/bitclust/generators/epub.rb +10 -3
  38. data/lib/bitclust/htmlutils.rb +1 -1
  39. data/lib/bitclust/include_graph.rb +375 -0
  40. data/lib/bitclust/include_pruner.rb +144 -0
  41. data/lib/bitclust/interface.rb +1 -1
  42. data/lib/bitclust/libraryentry.rb +8 -7
  43. data/lib/bitclust/lineinput.rb +7 -5
  44. data/lib/bitclust/link_checker.rb +179 -0
  45. data/lib/bitclust/markdown_bridge.rb +186 -0
  46. data/lib/bitclust/markdown_orchestrator.rb +267 -0
  47. data/lib/bitclust/markdown_to_rrd.rb +824 -0
  48. data/lib/bitclust/markdown_tree.rb +217 -0
  49. data/lib/bitclust/mdcompiler.rb +883 -0
  50. data/lib/bitclust/mdparser.rb +347 -0
  51. data/lib/bitclust/messagecatalog.rb +3 -3
  52. data/lib/bitclust/method_since_calculator.rb +117 -0
  53. data/lib/bitclust/methoddatabase.rb +124 -14
  54. data/lib/bitclust/methodentry.rb +125 -7
  55. data/lib/bitclust/methodid.rb +12 -11
  56. data/lib/bitclust/methodsignature.rb +10 -4
  57. data/lib/bitclust/nameutils.rb +41 -22
  58. data/lib/bitclust/preprocessor.rb +66 -29
  59. data/lib/bitclust/rdcompiler.rb +195 -95
  60. data/lib/bitclust/refsdatabase.rb +23 -8
  61. data/lib/bitclust/reloadable_request_handler.rb +72 -0
  62. data/lib/bitclust/requesthandler.rb +21 -16
  63. data/lib/bitclust/ridatabase.rb +10 -4
  64. data/lib/bitclust/rrd_to_markdown.rb +925 -0
  65. data/lib/bitclust/rrdparser.rb +196 -30
  66. data/lib/bitclust/runner.rb +17 -2
  67. data/lib/bitclust/screen.rb +80 -11
  68. data/lib/bitclust/search_index_generator.rb +288 -0
  69. data/lib/bitclust/searcher.rb +69 -20
  70. data/lib/bitclust/simplesearcher.rb +24 -12
  71. data/lib/bitclust/subcommand.rb +7 -1
  72. data/lib/bitclust/subcommands/ancestors_command.rb +9 -2
  73. data/lib/bitclust/subcommands/checklink_command.rb +54 -0
  74. data/lib/bitclust/subcommands/chm_command.rb +15 -7
  75. data/lib/bitclust/subcommands/classes_command.rb +5 -0
  76. data/lib/bitclust/subcommands/extract_command.rb +5 -0
  77. data/lib/bitclust/subcommands/htmlfile_command.rb +21 -7
  78. data/lib/bitclust/subcommands/init_command.rb +4 -1
  79. data/lib/bitclust/subcommands/list_command.rb +12 -4
  80. data/lib/bitclust/subcommands/lookup_command.rb +28 -9
  81. data/lib/bitclust/subcommands/methods_command.rb +10 -2
  82. data/lib/bitclust/subcommands/methodsince_command.rb +80 -0
  83. data/lib/bitclust/subcommands/preproc_command.rb +5 -0
  84. data/lib/bitclust/subcommands/property_command.rb +2 -1
  85. data/lib/bitclust/subcommands/searchpage_command.rb +102 -0
  86. data/lib/bitclust/subcommands/server_command.rb +10 -8
  87. data/lib/bitclust/subcommands/setup_command.rb +24 -10
  88. data/lib/bitclust/subcommands/statichtml_command.rb +129 -6
  89. data/lib/bitclust/subcommands/update_command.rb +110 -2
  90. data/lib/bitclust/syntax_highlighter.rb +48 -4
  91. data/lib/bitclust/textutils.rb +3 -3
  92. data/lib/bitclust/version.rb +1 -1
  93. data/lib/bitclust/version_badges.rb +90 -0
  94. data/lib/bitclust/whole_file_gate.rb +137 -0
  95. data/test/test_app.rb +269 -0
  96. data/test/test_bitclust.rb +2 -0
  97. data/test/test_capi_converter.rb +91 -0
  98. data/test/test_class_screen.rb +413 -0
  99. data/test/test_copy_doc_md.rb +53 -0
  100. data/test/test_doc_converter.rb +78 -0
  101. data/test/test_entity_splitter.rb +231 -0
  102. data/test/test_entry.rb +207 -2
  103. data/test/test_eol_warning.rb +43 -0
  104. data/test/test_functionreferenceparser.rb +11 -0
  105. data/test/test_include_graph.rb +640 -0
  106. data/test/test_include_pruner.rb +133 -0
  107. data/test/test_link_checker.rb +114 -0
  108. data/test/test_lookup_command.rb +135 -0
  109. data/test/test_markdown_bridge.rb +217 -0
  110. data/test/test_markdown_orchestrator.rb +478 -0
  111. data/test/test_markdown_to_rrd.rb +757 -0
  112. data/test/test_markdown_tree.rb +369 -0
  113. data/test/test_mdcompiler.rb +1276 -0
  114. data/test/test_mdparser.rb +538 -0
  115. data/test/test_method_screen.rb +166 -0
  116. data/test/test_method_since_calculator.rb +290 -0
  117. data/test/test_methoddatabase.rb +16 -0
  118. data/test/test_methodentry.rb +328 -0
  119. data/test/test_methodsignature.rb +3 -1
  120. data/test/test_methodsince_command.rb +168 -0
  121. data/test/test_nameutils.rb +22 -0
  122. data/test/test_preprocessor.rb +215 -0
  123. data/test/test_rdcompiler.rb +401 -30
  124. data/test/test_refsdatabase.rb +32 -0
  125. data/test/test_rrd_to_markdown.rb +968 -0
  126. data/test/test_rrdparser.rb +295 -2
  127. data/test/test_run_ruby_wasm.rb +54 -0
  128. data/test/test_run_worker_prelude.rb +83 -0
  129. data/test/test_runner.rb +51 -0
  130. data/test/test_search_index_generator.rb +513 -0
  131. data/test/test_search_screen.rb +48 -0
  132. data/test/test_searcher.rb +132 -0
  133. data/test/test_searchpage_command.rb +167 -0
  134. data/test/test_simplesearcher.rb +28 -0
  135. data/test/test_statichtml_command.rb +204 -0
  136. data/test/test_syntax_highlighter.rb +60 -0
  137. data/test/test_whole_file_gate.rb +175 -0
  138. data/theme/default/js/NOTICE +42 -0
  139. data/theme/default/js/run-worker.js +111 -0
  140. data/theme/default/js/run.js +350 -0
  141. data/theme/default/js/search_controller.js +134 -0
  142. data/theme/default/js/search_init.js +176 -0
  143. data/theme/default/js/search_navigation.js +110 -0
  144. data/theme/default/js/search_page.js +202 -0
  145. data/theme/default/js/search_ranker.js +244 -0
  146. data/theme/default/script.js +91 -18
  147. data/theme/default/search.css +149 -0
  148. data/theme/default/style.css +193 -21
  149. data/theme/default/syntax-highlight.css +8 -0
  150. data/theme/lillia/style.css +45 -1
  151. metadata +161 -20
  152. data/README +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31e60901f080112247e8bb929f914fdb65133ab75299a7a2c131439b51834a8b
4
- data.tar.gz: 06cc3117a5652403207d78d42c40ee90e392a609887ffd0c2bc0dd5b77042ff9
3
+ metadata.gz: ea74921a9df5a9e7009ee4d7b4219ab4bf9f28fa369c1e8fd558a4ee5b661fdf
4
+ data.tar.gz: 35847d933f8ca3a73a60c2333f084555b301d46d790187020f79830749a60b60
5
5
  SHA512:
6
- metadata.gz: f1d6c5f6848e7aabc1f6c953f81eebca321985ca76db32af3dd8d054d3d4ae801a7741d2060bc70e9756354ea2cf94d9cd2fbea938aa9b00c631816da623b837
7
- data.tar.gz: 60c1147eb9a1b64084518fd16244ac2561236c3d3a61f5de23c437744a6955af7b3c36d83e01092f7c4700a9adce238925154653af7d2795199b0b7cc1093303
6
+ metadata.gz: 0ebd81dbaf1ccb47c60b46297cae6067a6708e3eb686f47b8d7890b49149f2018ce977cf762e30f5b7dda6c70b793edb5bf688c755c36b25b626e4f2b6b16cf8
7
+ data.tar.gz: 2fbfddeb46e668c1a3c3e2bcf9b36f844cde0b6c4056c7e38a79863d7a6ee378db7b78093b47031910eb948e6fb2c13f29141cd053366e500a88b6b0f8337ace
data/Gemfile CHANGED
@@ -1,6 +1,9 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gem "rake"
4
+ gem "steep", "~> 1.9.0", require: false
5
+
6
+ gem "uri"
4
7
 
5
8
  # Specify your gem's dependencies in bitclust.gemspec
6
9
  gemspec :name => "bitclust-core"
data/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # BitClust
2
+
3
+ BitClust は Ruby リファレンスマニュアル(通称「るりま」)のドキュメント処理
4
+ フレームワークです。ドキュメントソース([rurema/doctree](https://github.com/rurema/doctree))を
5
+ パースしてデータベース化し、HTML(静的サイト・HTTP サーバ)、CHM、EPUB などに
6
+ 変換します。生成されたマニュアルは https://docs.ruby-lang.org/ja/ で公開されています。
7
+
8
+ ## ドキュメント
9
+
10
+ - [doc/usage.md](doc/usage.md) — インストール方法と各サブコマンドの使い方
11
+ - [doctree の docs/](https://github.com/rurema/doctree/tree/master/docs) — るりまプロジェクト全体の文書
12
+ (ドキュメントの書き方・ビルド方法・チュートリアルなど)
13
+
14
+ ## 開発を始める
15
+
16
+ ```console
17
+ $ git clone https://github.com/rurema/bitclust.git
18
+ $ cd bitclust
19
+ $ bundle install
20
+ ```
21
+
22
+ ### テスト
23
+
24
+ ```console
25
+ $ bundle exec rake test # 全テスト(デフォルトタスク)
26
+ $ ruby test/test_rdcompiler.rb # 単一のテストファイル
27
+ ```
28
+
29
+ ### 型定義
30
+
31
+ RBS 型定義が `sig/` にあります。
32
+
33
+ ```console
34
+ $ bundle exec rake sig # 型定義の再生成
35
+ $ bundle exec steep check # 型検査
36
+ ```
37
+
38
+ ### doctree と組み合わせて動作確認する
39
+
40
+ ドキュメント本体のビルドは doctree 側の Rake タスクから行います。
41
+ doctree の `Gemfile` は環境変数 `BITCLUST_PATH` でローカルの bitclust を
42
+ 参照できるので、手元の変更を反映したマニュアルを生成して確認できます。
43
+
44
+ ```console
45
+ $ git clone https://github.com/rurema/doctree.git
46
+ $ cd doctree
47
+ $ bundle install # ../bitclust があればそれを使う
48
+ $ bundle exec rake generate:3.4 # データベース生成
49
+ $ bundle exec rake statichtml:3.4 # 静的 HTML 生成
50
+ ```
51
+
52
+ 詳細は [doctree の docs/](https://github.com/rurema/doctree/tree/master/docs) を
53
+ 参照してください。
54
+
55
+ ## 用語集
56
+
57
+ - **entry** — ドキュメント化の対象。クラス: `Entry` `LibraryEntry` `ClassEntry` `MethodEntry` `DocEntry` `FunctionEntry`
58
+ - **screen** — ビュークラス。BitClust server、`statichtml`、`chm` サブコマンドなどが使う
59
+ - **singleton object** — `ARGF` や `main` など
60
+ - **BitClust server** — ブラウザでリファレンスを見るための HTTP サーバ(`bitclust server`)
61
+ - **Refe server** — `refe --server` で起動する DRb サーバ。BitClust DB を DRuby で公開する
62
+
63
+ ## ライセンス
64
+
65
+ Ruby License
data/Rakefile CHANGED
@@ -15,6 +15,38 @@ task :test do
15
15
  sh 'ruby test/run_test.rb'
16
16
  end
17
17
 
18
+ desc "run JS tests (requires qjs / QuickJS)"
19
+ namespace :test do
20
+ task :js do
21
+ sh 'qjs', 'test/js/test_run.mjs'
22
+ sh 'qjs', 'test/js/test_script.mjs'
23
+ sh 'qjs', 'test/js/test_search.mjs'
24
+ end
25
+ end
26
+
27
+ desc "Re-generate sig/prototype"
28
+ task :sig do
29
+ out_dir = 'sig-prototype'
30
+ FileUtils.rm_rf out_dir
31
+ sh "rbs prototype rb --out-dir=#{out_dir} lib"
32
+ FileUtils.rm "#{out_dir}/bitclust/compat.rbs"
33
+ sh "rbs subtract --write #{out_dir} sig"
34
+ FileUtils.rmdir ["#{out_dir}/bitclust/generators", "#{out_dir}/bitclust/subcommands", "#{out_dir}/bitclust", "#{out_dir}"]
35
+ sh 'rbs validate'
36
+ end
37
+
38
+ namespace :rbs do
39
+ desc 'rbs collection install'
40
+ task :install do
41
+ sh 'rbs collection install'
42
+ end
43
+
44
+ desc 'rbs collection update'
45
+ task :update do
46
+ sh 'rbs collection update'
47
+ end
48
+ end
49
+
18
50
  Bundler::GemHelper.install_tasks(:name => "bitclust-core")
19
51
  Bundler::GemHelper.install_tasks(:name => "bitclust-dev")
20
52
  Bundler::GemHelper.install_tasks(:name => "refe2")
@@ -14,6 +14,8 @@ Ancestor Methods
14
14
  継承しているメソッド
15
15
  Ancestor Methods %s
16
16
  %sから継承しているメソッド
17
+ Ancestor Singleton Methods %s
18
+ %sから継承している特異メソッド
17
19
  Builtin
18
20
  組み込み
19
21
  Builtin Library
@@ -62,10 +64,14 @@ Library
62
64
  ライブラリ
63
65
  Library Index
64
66
  ライブラリ一覧
67
+ Latest version
68
+ 最新版のマニュアルへ
65
69
  Math
66
70
  数学
67
71
  Method
68
72
  メソッド
73
+ Methods Added by Dynamic Include
74
+ 動的includeで追加されるメソッド
69
75
  Modules
70
76
  モジュール
71
77
  Module Functions
@@ -78,6 +84,10 @@ Objects
78
84
  オブジェクト
79
85
  Private Instance Methods
80
86
  privateメソッド
87
+ Protected Instance Methods
88
+ protectedメソッド
89
+ Redefined Methods
90
+ 再定義されたメソッド
81
91
  Private Singleton Methods
82
92
  private特異メソッド
83
93
  Required Libraries
@@ -102,8 +112,12 @@ Text
102
112
  テキスト
103
113
  Thread
104
114
  スレッド
115
+ This reference manual is for a version of Ruby that is no longer maintained.
116
+ このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。
117
+ Undefined Methods for Explanation
118
+ 説明のための未定義メソッド
105
119
  ancestors
106
- クラスの継承リスト
120
+ クラス・モジュールの継承リスト
107
121
  class %s
108
122
  %sクラス
109
123
  library %s
@@ -112,3 +126,7 @@ module %s
112
126
  %sモジュール
113
127
  object %s
114
128
  %sオブジェクト
129
+ since Ruby %s
130
+ Ruby %s から
131
+ removed in Ruby %s
132
+ Ruby %s で削除
@@ -0,0 +1,90 @@
1
+ <!DOCTYPE html>
2
+ <html lang="ja">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Ruby リファレンスマニュアル検索</title>
7
+ <link rel="stylesheet" href="search.css">
8
+ <style>
9
+ /* 検索ボックス用の search.css を全画面ページ向けに上書きする */
10
+ body {
11
+ margin: 0;
12
+ font-family: sans-serif;
13
+ color: #222;
14
+ background: #fff;
15
+ }
16
+ a { color: #33a; }
17
+ #searchpage-main {
18
+ max-width: 46em;
19
+ margin: 0 auto;
20
+ padding: 1.5em 1em 3em;
21
+ }
22
+ #searchpage-main h1 {
23
+ font-size: 1.3em;
24
+ border-bottom: 2px solid #33a;
25
+ padding-bottom: 0.3em;
26
+ }
27
+ #searchpage-main h1 a {
28
+ color: inherit;
29
+ text-decoration: none;
30
+ }
31
+ #search-section {
32
+ position: static;
33
+ width: auto;
34
+ max-width: none;
35
+ margin: 1em 0 0.5em;
36
+ }
37
+ #search-field {
38
+ font-size: 1.1em;
39
+ }
40
+ .search-results {
41
+ position: static;
42
+ border: none;
43
+ box-shadow: none;
44
+ max-height: none;
45
+ overflow: visible;
46
+ }
47
+ .search-versions {
48
+ margin: 0.15em 0 0;
49
+ font-size: 0.8em;
50
+ color: #555;
51
+ }
52
+ .search-versions a {
53
+ display: inline-block;
54
+ margin-right: 0.35em;
55
+ padding: 0 0.4em;
56
+ border: 1px solid #99a;
57
+ border-radius: 3px;
58
+ text-decoration: none;
59
+ }
60
+ .searchpage-note {
61
+ font-size: 0.85em;
62
+ color: #555;
63
+ }
64
+ </style>
65
+ <script>
66
+ var search_versions = %%SEARCH_VERSIONS%%;
67
+ var search_version_base = "../";
68
+ </script>
69
+ <script src="js/search_data.js"></script>
70
+ <script src="js/search_navigation.js"></script>
71
+ <script src="js/search_ranker.js"></script>
72
+ <script src="js/search_controller.js"></script>
73
+ <script src="js/search_page.js"></script>
74
+ </head>
75
+ <body>
76
+ <main id="searchpage-main">
77
+ <h1><a href="../">Ruby リファレンスマニュアル</a> 検索</h1>
78
+ <div id="search-section" role="search">
79
+ <input id="search-field" type="text" autocomplete="off" spellcheck="false"
80
+ placeholder="クラス / メソッド / ライブラリ名で検索 (例: Array#each, String, socket)"
81
+ aria-label="リファレンス検索">
82
+ <ul id="search-results" class="search-results" aria-expanded="false"></ul>
83
+ </div>
84
+ <div class="searchpage-note">
85
+ <p>クラス・モジュール・メソッド・ライブラリ・特殊変数・ドキュメントの<strong>名前</strong>を全バージョン横断で検索します。検索結果のバージョンリンクから各バージョンのページを開けます。</p>
86
+ <p>本文の全文検索が必要な場合は、検索エンジンで <code>site:docs.ruby-lang.org/ja/ キーワード</code> を利用してください。</p>
87
+ </div>
88
+ </main>
89
+ </body>
90
+ </html>
@@ -60,7 +60,9 @@
60
60
  [_('Instance Methods'), ents.instance_methods ],
61
61
  [_('Private Singleton Methods'), ents.private_singleton_methods ],
62
62
  [_('Private Instance Methods'), ents.private_instance_methods ],
63
+ [_('Protected Instance Methods'),ents.protected_instance_methods ],
63
64
  [_('Module Functions'), ents.module_functions ],
65
+ [_('Undefined Methods for Explanation'), ents.nomethod ],
64
66
  [_('Constants'), ents.constants ],
65
67
  [_('Special Variables'), ents.special_variables ]]\
66
68
  .each do |label, entries|
@@ -77,9 +79,7 @@
77
79
  foreach_method_chunk(m.source) do |sigs, src| %>
78
80
  <tr>
79
81
  <td class="signature">
80
- <a href="<%=h method_url(m.spec_string) %>"><code>
81
- <%= sigs.map {|sig| h(sig.friendly_string) }.join("<br>") %>
82
- </code></a>
82
+ <%= method_row_signature_html(m, sigs) %>
83
83
  </td>
84
84
  <% if m.redefined? %>
85
85
  <td class="description"><%= compile_rd(src) %></td>
@@ -107,11 +107,44 @@
107
107
  <%= headline(_('Inherited Methods')) %>
108
108
  <p><code>
109
109
  <% specs.each do |s| %>
110
- <%= method_link(s.to_s, (s.type == '#' ? s.method : s.type + s.method)) %>
110
+ <%= method_link(s.to_s, (s.type == '#' ? s.method : display_typemark(s.type, @target_version) + s.method)) %>
111
111
  <% end %>
112
112
  </code></p>
113
113
  <% end %>
114
114
 
115
+ <%
116
+ [[_('Redefined Methods'), ents.redefined]]\
117
+ .each do |label, entries|
118
+ unless entries.empty? %>
119
+ <%= headline(label) %>
120
+ <table class="entries methods">
121
+ <tr>
122
+ <th><%= _('Signature') %></th>
123
+ <th><%= _('Description') %></th>
124
+ <th><%= _('Library') %></th>
125
+ </tr>
126
+ <%
127
+ headline_push
128
+ entries.each do |m|
129
+ foreach_method_chunk(m.source) do |sigs, src| %>
130
+ <tr>
131
+ <td class="signature">
132
+ <%= method_row_signature_html(m, sigs) %>
133
+ </td>
134
+ <td class="description"><%= compile_rd(src) %></td>
135
+ <td class="library"><%= library_link(m.library.name) %></td>
136
+ </tr>
137
+ <%
138
+ end
139
+ end
140
+ headline_pop
141
+ %>
142
+ </table>
143
+ <%
144
+ end
145
+ end
146
+ %>
147
+
115
148
  <%
116
149
  [[_('Added Methods'), ents.added]]\
117
150
  .each do |label, entries|
@@ -129,9 +162,7 @@
129
162
  foreach_method_chunk(m.source) do |sigs, src| %>
130
163
  <tr>
131
164
  <td class="signature">
132
- <a href="<%=h method_url(m.spec_string) %>"><code>
133
- <%= sigs.map {|sig| h(sig.friendly_string) }.join("<br>") %>
134
- </code></a>
165
+ <%= method_row_signature_html(m, sigs) %>
135
166
  </td>
136
167
  <td class="description"><%= compile_rd(src) %></td>
137
168
  <td class="library"><%= library_link(m.library.name) %></td>
@@ -145,6 +176,36 @@
145
176
  <%
146
177
  end
147
178
  end
148
- headline_pop
149
179
  %>
150
180
 
181
+ <%
182
+ dyninc_entries = @entry.dynamically_included_entries
183
+ unless dyninc_entries.empty? %>
184
+ <%= headline(_('Methods Added by Dynamic Include')) %>
185
+ <table class="entries methods">
186
+ <tr>
187
+ <th><%= _('Signature') %></th>
188
+ <th><%= _('Description') %></th>
189
+ <th><%= _('Module') %></th>
190
+ </tr>
191
+ <%
192
+ headline_push
193
+ dyninc_entries.each do |m|
194
+ foreach_method_chunk(m.source) do |sigs, src| %>
195
+ <tr>
196
+ <td class="signature">
197
+ <%= method_row_signature_html(m, sigs) %>
198
+ </td>
199
+ <td class="description"><%= compile_rd(src) %></td>
200
+ <td class="library"><%= class_link(m.klass.name) + " (by " + library_link(m.library.name) + ")" %></td>
201
+ </tr>
202
+ <%
203
+ end
204
+ end
205
+ headline_pop
206
+ %>
207
+ </table>
208
+ <%
209
+ end
210
+ headline_pop
211
+ %>
@@ -1,5 +1,5 @@
1
1
  <%
2
- @title = "#{@entry.type_label} #{@entry.label}"
2
+ @title = "#{@entry.type_label} #{@entry.display_label}"
3
3
  @description = @entry.description
4
4
  %>
5
5
  <p>
@@ -11,7 +11,7 @@
11
11
  <%= search_form() %>
12
12
 
13
13
  <% headline_init %>
14
- <%= headline("#{@entry.type_label} #{@entry.label}") %>
14
+ <%= headline("#{@entry.type_label} #{@entry.display_label}") %>
15
15
  <dl class="functionlist">
16
16
  <dt>
17
17
  <code><%=h @entry.header %></code>
@@ -11,13 +11,21 @@
11
11
  <title><%=h @title %> (Ruby <%=h ruby_version %>)</title>
12
12
  <meta name="description" content="<%=h @description %>">
13
13
  <link rel="search" type="application/opensearchdescription+xml" title="<%= _('Ruby %s Reference Manual', ruby_version()) %>" href="<%=h opensearchdescription_url() %>">
14
+ <% if run_ruby_wasm_url %>
15
+ <meta name="rurema-run-ruby-wasm" content="<%=h run_ruby_wasm_url %>">
16
+ <script type="module" src="<%=h custom_js_url('js/run.js') %>"></script>
17
+ <% end %>
14
18
  </head>
15
19
  <body>
20
+ <% if eol_warning?() %>
21
+ <p class="eol-warning">
22
+ <%= _('This reference manual is for a version of Ruby that is no longer maintained.') %>
23
+ <a href="https://docs.ruby-lang.org/ja/latest/"><%= _('Latest version') %></a>
24
+ </p>
25
+ <% end %>
16
26
  <%= yield %>
17
27
  <div id="footer">
18
- <a rel="license" href="https://creativecommons.org/licenses/by/3.0/">
19
- <img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" />
20
- </a>
28
+ <a rel="license" href="https://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" /></a>
21
29
  </div>
22
30
  </body>
23
31
  </html>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  entry = @entries.sort.first
3
- @title = "#{entry.type_label} #{entry.label}"
3
+ @title = "#{entry.type_label} #{entry.display_title_labels.join(', ')}"
4
4
  @description = entry.description
5
5
  %>
6
6
  <p>
@@ -15,7 +15,7 @@
15
15
 
16
16
 
17
17
  <% headline_init %>
18
- <%= headline("#{entry.type_label} #{entry.label}") %>
18
+ <%= headline("#{entry.type_label} #{entry.display_label}") %>
19
19
  <% headline_push %>
20
20
  <dl class="methodlist">
21
21
  <% @entries.sort.each do |ent| %>
@@ -39,7 +39,7 @@
39
39
  else
40
40
  sigs.map {|sig|
41
41
  method_link(e.spec_string,
42
- e.klass.name + e.typemark + sig.to_s)
42
+ e.klass.name + e.display_typemark + sig.to_s)
43
43
  }
44
44
  end.join("<br>\n") %></td>
45
45
  <td class="description"><%= compile_rd(src) %></td>
@@ -57,7 +57,10 @@
57
57
  [_('Instance Methods'), ents.instance_methods ],
58
58
  [_('Private Singleton Methods'), ents.private_singleton_methods ],
59
59
  [_('Private Instance Methods'), ents.private_instance_methods ],
60
+ [_('Protected Instance Methods'),ents.protected_instance_methods ],
60
61
  [_('Module Functions'), ents.module_functions ],
62
+ [_('Added Methods'), ents.added ],
63
+ [_('Redefined Methods'), ents.redefined ],
61
64
  [_('Constants'), ents.constants ],
62
65
  [_('Special Variables'), ents.special_variables ,'$']] %>
63
66
  <%= headline(_("Index")) %>
@@ -96,6 +99,24 @@
96
99
  <%
97
100
  end
98
101
  end
99
- headline_pop
100
102
  %>
101
103
 
104
+ <%
105
+ dyninc_groups = @entry.dynamically_included_entries.group_by(&:klass)
106
+ unless dyninc_groups.empty? %>
107
+ <%= headline(_('Methods Added by Dynamic Include')) %>
108
+ <dl>
109
+ <% dyninc_groups.each do |mod, mod_entries| %>
110
+ <dt><%= mod.name %> (by <%= mod.library.name %>)</dt>
111
+ <dd>
112
+ <ul>
113
+ <% mod_entries.each do |m| %>
114
+ <li><%= method_link(m.spec_string, m.name) %></li>
115
+ <% end %>
116
+ </ul>
117
+ </dd>
118
+ <% end %>
119
+ </dl>
120
+ <% end
121
+ headline_pop
122
+ %>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  entry = @entry
3
- @title = "#{entry.type_label} #{entry.label}"
3
+ @title = "#{entry.type_label} #{entry.display_label}"
4
4
  %>
5
5
  <p>
6
6
  <%= manual_home_link() %>
@@ -10,7 +10,7 @@
10
10
  </p>
11
11
 
12
12
  <% headline_init %>
13
- <%= headline("#{entry.type_label} #{entry.label}") %>
13
+ <%= headline("#{entry.type_label} #{entry.display_label}") %>
14
14
  <dl class="functionlist">
15
15
  <dt>
16
16
  <code><%= entry.header %></code>
@@ -11,9 +11,7 @@
11
11
  <body>
12
12
  <%= yield %>
13
13
  <div id="footer">
14
- <a rel="license" href="https://creativecommons.org/licenses/by/3.0/">
15
- <img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" />
16
- </a>
14
+ <a rel="license" href="https://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" /></a>
17
15
  </div>
18
16
  </body>
19
17
  </html>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  entry = @entries.sort.first
3
- @title = "#{entry.type_label} #{entry.label}"
3
+ @title = "#{entry.type_label} #{entry.display_title_labels.join(', ')}"
4
4
  %>
5
5
  <p>
6
6
  <%= manual_home_link() %>
@@ -12,7 +12,7 @@
12
12
  </p>
13
13
 
14
14
  <% headline_init %>
15
- <%= headline("#{entry.type_label} #{entry.label}") %>
15
+ <%= headline("#{entry.type_label} #{entry.display_label}") %>
16
16
  <dl class="methodlist">
17
17
  <%
18
18
  headline_push
@@ -59,9 +59,11 @@
59
59
  [_('Instance Methods'), ents.instance_methods ],
60
60
  [_('Private Singleton Methods'), ents.private_singleton_methods ],
61
61
  [_('Private Instance Methods'), ents.private_instance_methods ],
62
+ [_('Protected Instance Methods'),ents.protected_instance_methods ],
62
63
  [_('Module Functions'), ents.module_functions ],
63
64
  [_('Constants'), ents.constants ],
64
65
  [_('Special Variables'), ents.special_variables ],
66
+ [_('Redefined Methods'), ents.redefined ],
65
67
  [_('Added Methods'), ents.added ] ]\
66
68
  .each do |label, entries|
67
69
  unless entries.empty? %>
@@ -70,7 +72,7 @@
70
72
  <%
71
73
  headline_push
72
74
  entries.each do |m|
73
- %>
75
+ %>
74
76
  <span id="<%= BitClust::NameUtils.encodename_url(m.name) %>"></span>
75
77
  <%= compile_method(m) %>
76
78
  <%
@@ -81,6 +83,25 @@
81
83
  <%
82
84
  end
83
85
  end
86
+ %>
87
+
88
+ <%
89
+ dyninc_groups = @entry.dynamically_included_entries.group_by(&:klass)
90
+ unless dyninc_groups.empty? %>
91
+ <%= headline(_('Methods Added by Dynamic Include')) %>
92
+ <dl class="rightlist">
93
+ <% dyninc_groups.each do |mod, mod_entries| %>
94
+ <dt><%= mod.name %> (by <%= mod.library.name %>)</dt>
95
+ <dd>
96
+ <ul>
97
+ <% mod_entries.each do |m| %>
98
+ <li><%= method_link(m.spec_string, m.name) %></li>
99
+ <% end %>
100
+ </ul>
101
+ </dd>
102
+ <% end %>
103
+ </dl>
104
+ <% end
84
105
  headline_pop
85
106
  %>
86
107
  </div>
@@ -107,11 +128,11 @@
107
128
  </form>
108
129
  <ul id="index-classes-list">
109
130
  <%
110
- lib = @entry.library
111
- ((lib.all_classes - lib.all_error_classes).sort + lib.all_error_classes).each do |c|
112
- %>
131
+ lib = @entry.library
132
+ ((lib.all_classes - lib.all_error_classes).sort + lib.all_error_classes).each do |c|
133
+ %>
113
134
  <li><%= class_link(c.name, "#{c.name}") %></li>
114
- <% end %>
135
+ <% end %>
115
136
  </ul>
116
137
  </div>
117
138
 
@@ -14,9 +14,7 @@
14
14
  <body>
15
15
  <%= yield %>
16
16
  <div id="footer">
17
- <a rel="license" href="https://creativecommons.org/licenses/by/3.0/">
18
- <img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" />
19
- </a>
17
+ <a rel="license" href="https://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" /></a>
20
18
  </div>
21
19
  </body>
22
20
  </html>
@@ -1,6 +1,6 @@
1
1
  <%
2
2
  entry = @entries.sort.first
3
- @title = "#{entry.type_label} #{entry.label}"
3
+ @title = "#{entry.type_label} #{entry.display_title_labels.join(', ')}"
4
4
  @description = entry.description
5
5
  %>
6
6
  <p>
@@ -13,7 +13,7 @@
13
13
  </p>
14
14
 
15
15
  <% headline_init %>
16
- <%= headline("#{entry.type_label} #{entry.label}") %>
16
+ <%= headline("#{entry.type_label} #{entry.display_label}") %>
17
17
  <dl class="methodlist">
18
18
  <%
19
19
  headline_push