@ai-ecoverse/wasix-ruby 3.4.11-2 → 3.4.11-21

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 (235) hide show
  1. package/PRESTAGE.md +53 -16
  2. package/README.md +164 -0
  3. package/THIRD-PARTY-NOTICES.md +727 -0
  4. package/bin/bundle +1 -1
  5. package/bin/bundler +1 -1
  6. package/bin/erb +1 -1
  7. package/bin/gem +1 -1
  8. package/bin/irb +1 -1
  9. package/bin/rake +1 -1
  10. package/bin/{ruby.wasm → ruby} +0 -0
  11. package/lib/ruby/3.4.0/io/console/size.rb +23 -0
  12. package/lib/ruby/3.4.0/socket.rb +1790 -0
  13. package/lib/ruby/3.4.0/wasm32-wasi/rbconfig.rb +38 -34
  14. package/lib/ruby/gems/3.4.0/cache/abbrev-0.1.2.gem +0 -0
  15. package/lib/ruby/gems/3.4.0/cache/base64-0.2.0.gem +0 -0
  16. package/lib/ruby/gems/3.4.0/cache/bigdecimal-3.1.8.gem +0 -0
  17. package/lib/ruby/gems/3.4.0/cache/csv-3.3.2.gem +0 -0
  18. package/lib/ruby/gems/3.4.0/cache/debug-1.11.0.gem +0 -0
  19. package/lib/ruby/gems/3.4.0/cache/drb-2.2.1.gem +0 -0
  20. package/lib/ruby/gems/3.4.0/cache/getoptlong-0.2.1.gem +0 -0
  21. package/lib/ruby/gems/3.4.0/cache/matrix-0.4.2.gem +0 -0
  22. package/lib/ruby/gems/3.4.0/cache/minitest-5.25.4.gem +0 -0
  23. package/lib/ruby/gems/3.4.0/cache/mutex_m-0.3.0.gem +0 -0
  24. package/lib/ruby/gems/3.4.0/cache/net-ftp-0.3.8.gem +0 -0
  25. package/lib/ruby/gems/3.4.0/cache/net-imap-0.5.15.gem +0 -0
  26. package/lib/ruby/gems/3.4.0/cache/net-pop-0.1.2.gem +0 -0
  27. package/lib/ruby/gems/3.4.0/cache/net-smtp-0.5.1.gem +0 -0
  28. package/lib/ruby/gems/3.4.0/cache/nkf-0.2.0.gem +0 -0
  29. package/lib/ruby/gems/3.4.0/cache/observer-0.1.2.gem +0 -0
  30. package/lib/ruby/gems/3.4.0/cache/power_assert-2.0.5.gem +0 -0
  31. package/lib/ruby/gems/3.4.0/cache/prime-0.1.3.gem +0 -0
  32. package/lib/ruby/gems/3.4.0/cache/racc-1.8.1.gem +0 -0
  33. package/lib/ruby/gems/3.4.0/cache/rake-13.2.1.gem +0 -0
  34. package/lib/ruby/gems/3.4.0/cache/rbs-3.8.0.gem +0 -0
  35. package/lib/ruby/gems/3.4.0/cache/repl_type_completor-0.1.9.gem +0 -0
  36. package/lib/ruby/gems/3.4.0/cache/resolv-replace-0.1.1.gem +0 -0
  37. package/lib/ruby/gems/3.4.0/cache/rexml-3.4.4.gem +0 -0
  38. package/lib/ruby/gems/3.4.0/cache/rinda-0.2.0.gem +0 -0
  39. package/lib/ruby/gems/3.4.0/cache/rss-0.3.1.gem +0 -0
  40. package/lib/ruby/gems/3.4.0/cache/syslog-0.2.0.gem +0 -0
  41. package/lib/ruby/gems/3.4.0/cache/test-unit-3.6.7.gem +0 -0
  42. package/lib/ruby/gems/3.4.0/cache/typeprof-0.30.1.gem +0 -0
  43. package/lib/ruby/gems/3.4.0/extensions/wasm32-wasi/3.4.0-static/bigdecimal-3.1.8/gem.build_complete +0 -0
  44. package/lib/ruby/gems/3.4.0/extensions/wasm32-wasi/3.4.0-static/debug-1.11.0/gem.build_complete +0 -0
  45. package/lib/ruby/gems/3.4.0/extensions/wasm32-wasi/3.4.0-static/nkf-0.2.0/gem.build_complete +0 -0
  46. package/lib/ruby/gems/3.4.0/extensions/wasm32-wasi/3.4.0-static/racc-1.8.1/gem.build_complete +0 -0
  47. package/lib/ruby/gems/3.4.0/extensions/wasm32-wasi/3.4.0-static/rbs-3.8.0/gem.build_complete +0 -0
  48. package/lib/ruby/gems/3.4.0/extensions/wasm32-wasi/3.4.0-static/syslog-0.2.0/gem.build_complete +0 -0
  49. package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/console +0 -0
  50. package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/bin/setup +0 -0
  51. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/bigdecimal.c +7794 -0
  52. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/bigdecimal.h +313 -0
  53. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/bits.h +141 -0
  54. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/extconf.rb +62 -0
  55. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/feature.h +68 -0
  56. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/missing/dtoa.c +3462 -0
  57. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/missing.c +27 -0
  58. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/missing.h +196 -0
  59. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/ext/bigdecimal/static_assert.h +54 -0
  60. package/lib/ruby/gems/3.4.0/gems/bundler-2.6.9/exe/bundle +29 -0
  61. package/lib/ruby/gems/3.4.0/gems/bundler-2.6.9/exe/bundler +4 -0
  62. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/ext/debug/debug.c +228 -0
  63. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/ext/debug/extconf.rb +27 -0
  64. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/ext/debug/iseq_collector.c +93 -0
  65. package/lib/ruby/gems/3.4.0/gems/erb-4.0.4.1/libexec/erb +164 -0
  66. package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/console +0 -0
  67. package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/bin/setup +0 -0
  68. package/lib/ruby/gems/3.4.0/gems/irb-1.14.3/exe/irb +9 -0
  69. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/bin/console +0 -0
  70. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/bin/setup +0 -0
  71. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/java/org/jruby/ext/nkf/Command.java +58 -0
  72. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/java/org/jruby/ext/nkf/CommandParser.java +70 -0
  73. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/java/org/jruby/ext/nkf/NKFLibrary.java +13 -0
  74. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/java/org/jruby/ext/nkf/Option.java +80 -0
  75. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/java/org/jruby/ext/nkf/Options.java +109 -0
  76. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/java/org/jruby/ext/nkf/RubyNKF.java +601 -0
  77. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/extconf.rb +3 -0
  78. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/nkf-utf8/config.h +51 -0
  79. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/nkf-utf8/nkf.c +7205 -0
  80. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/nkf-utf8/nkf.h +189 -0
  81. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/nkf-utf8/utf8tbl.c +14638 -0
  82. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/nkf-utf8/utf8tbl.h +72 -0
  83. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/ext/nkf/nkf.c +506 -0
  84. package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/console +0 -0
  85. package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/bin/setup +0 -0
  86. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/ext/racc/cparse/cparse.c +840 -0
  87. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/ext/racc/cparse/extconf.rb +8 -0
  88. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/extconf.rb +14 -0
  89. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/lexer.c +2728 -0
  90. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/lexer.h +179 -0
  91. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/lexer.re +147 -0
  92. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/lexstate.c +175 -0
  93. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/location.c +303 -0
  94. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/location.h +84 -0
  95. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/main.c +12 -0
  96. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/parser.c +2961 -0
  97. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/parser.h +18 -0
  98. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/parserstate.c +366 -0
  99. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/parserstate.h +161 -0
  100. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/rbs_extension.h +31 -0
  101. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/ext/rbs_extension/unescape.c +32 -0
  102. package/lib/ruby/gems/3.4.0/gems/rdoc-6.14.0/exe/rdoc +43 -0
  103. package/lib/ruby/gems/3.4.0/gems/rdoc-6.14.0/exe/ri +12 -0
  104. package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/console +0 -0
  105. package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/bin/setup +0 -0
  106. package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/console +0 -0
  107. package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/bin/setup +0 -0
  108. package/lib/ruby/gems/3.4.0/gems/syntax_suggest-2.0.3/exe/syntax_suggest +7 -0
  109. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/bin/console +0 -0
  110. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/bin/setup +0 -0
  111. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/ext/syslog/extconf.rb +26 -0
  112. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/ext/syslog/syslog.c +592 -0
  113. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/ext/syslog/syslog.txt +124 -0
  114. package/lib/ruby/gems/3.4.0/specifications/abbrev-0.1.2.gemspec +5 -4
  115. package/lib/ruby/gems/3.4.0/specifications/base64-0.2.0.gemspec +4 -3
  116. package/lib/ruby/gems/3.4.0/specifications/bigdecimal-3.1.8.gemspec +20 -45
  117. package/lib/ruby/gems/3.4.0/specifications/csv-3.3.2.gemspec +5 -3
  118. package/lib/ruby/gems/3.4.0/specifications/debug-1.11.0.gemspec +26 -27
  119. package/lib/ruby/gems/3.4.0/specifications/default/benchmark-0.4.0.gemspec +22 -0
  120. package/lib/ruby/gems/3.4.0/specifications/default/bundler-2.6.9.gemspec +23 -0
  121. package/lib/ruby/gems/3.4.0/specifications/default/cgi-0.4.2.gemspec +23 -0
  122. package/lib/ruby/gems/3.4.0/specifications/default/date-3.4.1.gemspec +23 -0
  123. package/lib/ruby/gems/3.4.0/specifications/default/delegate-0.4.0.gemspec +21 -0
  124. package/lib/ruby/gems/3.4.0/specifications/default/did_you_mean-2.0.0.gemspec +20 -0
  125. package/lib/ruby/gems/3.4.0/specifications/default/digest-3.2.0.gemspec +22 -0
  126. package/lib/ruby/gems/3.4.0/specifications/default/english-0.8.0.gemspec +21 -0
  127. package/lib/ruby/gems/3.4.0/specifications/default/erb-4.0.4.1.gemspec +29 -0
  128. package/lib/ruby/gems/3.4.0/specifications/default/error_highlight-0.7.0.gemspec +20 -0
  129. package/lib/ruby/gems/3.4.0/specifications/default/etc-1.4.6.gemspec +25 -0
  130. package/lib/ruby/gems/3.4.0/specifications/default/fcntl-1.2.0.gemspec +24 -0
  131. package/lib/ruby/gems/3.4.0/specifications/default/fileutils-1.7.3.gemspec +21 -0
  132. package/lib/ruby/gems/3.4.0/specifications/default/find-0.2.0.gemspec +21 -0
  133. package/lib/ruby/gems/3.4.0/specifications/default/forwardable-1.3.3.gemspec +21 -0
  134. package/lib/ruby/gems/3.4.0/specifications/default/io-console-0.8.1.gemspec +23 -0
  135. package/lib/ruby/gems/3.4.0/specifications/default/io-nonblock-0.3.2.gemspec +23 -0
  136. package/lib/ruby/gems/3.4.0/specifications/default/io-wait-0.3.2.gemspec +24 -0
  137. package/lib/ruby/gems/3.4.0/specifications/default/ipaddr-1.2.7.gemspec +20 -0
  138. package/lib/ruby/gems/3.4.0/specifications/default/irb-1.14.3.gemspec +28 -0
  139. package/lib/ruby/gems/3.4.0/specifications/default/json-2.9.1.gemspec +23 -0
  140. package/lib/ruby/gems/3.4.0/specifications/default/logger-1.6.4.gemspec +20 -0
  141. package/lib/ruby/gems/3.4.0/specifications/default/net-http-0.6.0.gemspec +26 -0
  142. package/lib/ruby/gems/3.4.0/specifications/default/net-protocol-0.2.2.gemspec +25 -0
  143. package/lib/ruby/gems/3.4.0/specifications/default/open-uri-0.5.0.gemspec +27 -0
  144. package/lib/ruby/gems/3.4.0/specifications/default/open3-0.2.1.gemspec +22 -0
  145. package/lib/ruby/gems/3.4.0/specifications/default/openssl-3.3.3.gemspec +24 -0
  146. package/lib/ruby/gems/3.4.0/specifications/default/optparse-0.6.0.gemspec +23 -0
  147. package/lib/ruby/gems/3.4.0/specifications/default/ostruct-0.6.1.gemspec +20 -0
  148. package/lib/ruby/gems/3.4.0/specifications/default/pathname-0.4.0.gemspec +24 -0
  149. package/lib/ruby/gems/3.4.0/specifications/default/pp-0.6.2.gemspec +26 -0
  150. package/lib/ruby/gems/3.4.0/specifications/default/prettyprint-0.2.0.gemspec +22 -0
  151. package/lib/ruby/gems/3.4.0/specifications/default/prism-1.5.3.gemspec +22 -0
  152. package/lib/ruby/gems/3.4.0/specifications/default/pstore-0.2.1.gemspec +21 -0
  153. package/lib/ruby/gems/3.4.0/specifications/default/psych-5.2.2.gemspec +30 -0
  154. package/lib/ruby/gems/3.4.0/specifications/default/rdoc-6.14.0.gemspec +30 -0
  155. package/lib/ruby/gems/3.4.0/specifications/default/readline-0.0.4.gemspec +23 -0
  156. package/lib/ruby/gems/3.4.0/specifications/default/reline-0.6.0.gemspec +25 -0
  157. package/lib/ruby/gems/3.4.0/specifications/default/resolv-0.7.2.gemspec +24 -0
  158. package/lib/ruby/gems/3.4.0/specifications/default/ruby2_keywords-0.0.5.gemspec +20 -0
  159. package/lib/ruby/gems/3.4.0/specifications/default/securerandom-0.4.1.gemspec +22 -0
  160. package/lib/ruby/gems/3.4.0/specifications/default/set-1.1.1.gemspec +21 -0
  161. package/lib/ruby/gems/3.4.0/specifications/default/shellwords-0.2.2.gemspec +22 -0
  162. package/lib/ruby/gems/3.4.0/specifications/default/singleton-0.3.0.gemspec +21 -0
  163. package/lib/ruby/gems/3.4.0/specifications/default/stringio-3.1.2.gemspec +23 -0
  164. package/lib/ruby/gems/3.4.0/specifications/default/strscan-3.1.2.gemspec +24 -0
  165. package/lib/ruby/gems/3.4.0/specifications/default/syntax_suggest-2.0.3.gemspec +23 -0
  166. package/lib/ruby/gems/3.4.0/specifications/default/tempfile-0.3.1.gemspec +21 -0
  167. package/lib/ruby/gems/3.4.0/specifications/default/time-0.4.1.gemspec +26 -0
  168. package/lib/ruby/gems/3.4.0/specifications/default/timeout-0.4.3.gemspec +21 -0
  169. package/lib/ruby/gems/3.4.0/specifications/default/tmpdir-0.3.1.gemspec +26 -0
  170. package/lib/ruby/gems/3.4.0/specifications/default/tsort-0.2.0.gemspec +22 -0
  171. package/lib/ruby/gems/3.4.0/specifications/default/un-0.3.0.gemspec +22 -0
  172. package/lib/ruby/gems/3.4.0/specifications/default/uri-1.0.4.gemspec +22 -0
  173. package/lib/ruby/gems/3.4.0/specifications/default/weakref-0.1.3.gemspec +25 -0
  174. package/lib/ruby/gems/3.4.0/specifications/default/yaml-0.4.0.gemspec +21 -0
  175. package/lib/ruby/gems/3.4.0/specifications/default/zlib-3.2.3.gemspec +23 -0
  176. package/lib/ruby/gems/3.4.0/specifications/drb-2.2.1.gemspec +5 -4
  177. package/lib/ruby/gems/3.4.0/specifications/getoptlong-0.2.1.gemspec +5 -4
  178. package/lib/ruby/gems/3.4.0/specifications/matrix-0.4.2.gemspec +5 -4
  179. package/lib/ruby/gems/3.4.0/specifications/minitest-5.25.4.gemspec +7 -5
  180. package/lib/ruby/gems/3.4.0/specifications/mutex_m-0.3.0.gemspec +4 -3
  181. package/lib/ruby/gems/3.4.0/specifications/net-ftp-0.3.8.gemspec +10 -4
  182. package/lib/ruby/gems/3.4.0/specifications/net-imap-0.5.15.gemspec +7 -5
  183. package/lib/ruby/gems/3.4.0/specifications/net-pop-0.1.2.gemspec +9 -4
  184. package/lib/ruby/gems/3.4.0/specifications/net-smtp-0.5.1.gemspec +9 -4
  185. package/lib/ruby/gems/3.4.0/specifications/nkf-0.2.0.gemspec +22 -39
  186. package/lib/ruby/gems/3.4.0/specifications/observer-0.1.2.gemspec +5 -4
  187. package/lib/ruby/gems/3.4.0/specifications/power_assert-2.0.5.gemspec +6 -4
  188. package/lib/ruby/gems/3.4.0/specifications/prime-0.1.3.gemspec +10 -4
  189. package/lib/ruby/gems/3.4.0/specifications/racc-1.8.1.gemspec +5 -3
  190. package/lib/ruby/gems/3.4.0/specifications/rake-13.2.1.gemspec +6 -4
  191. package/lib/ruby/gems/3.4.0/specifications/rbs-3.8.0.gemspec +25 -43
  192. package/lib/ruby/gems/3.4.0/specifications/repl_type_completor-0.1.9.gemspec +6 -5
  193. package/lib/ruby/gems/3.4.0/specifications/resolv-replace-0.1.1.gemspec +6 -5
  194. package/lib/ruby/gems/3.4.0/specifications/rexml-3.4.4.gemspec +5 -3
  195. package/lib/ruby/gems/3.4.0/specifications/rinda-0.2.0.gemspec +8 -5
  196. package/lib/ruby/gems/3.4.0/specifications/rss-0.3.1.gemspec +5 -4
  197. package/lib/ruby/gems/3.4.0/specifications/syslog-0.2.0.gemspec +21 -22
  198. package/lib/ruby/gems/3.4.0/specifications/test-unit-3.6.7.gemspec +5 -4
  199. package/lib/ruby/gems/3.4.0/specifications/typeprof-0.30.1.gemspec +7 -5
  200. package/package.json +64 -25
  201. package/lib/ruby/3.4.0/expect.rb +0 -71
  202. package/lib/ruby/gems/3.4.0/gems/abbrev-0.1.2/abbrev.gemspec +0 -29
  203. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/.bundled.bigdecimal-3.1.8.gemspec +0 -23
  204. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/bigdecimal-3.1.8.gemspec +0 -23
  205. package/lib/ruby/gems/3.4.0/gems/bigdecimal-3.1.8/bigdecimal.gemspec +0 -50
  206. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/.bundled.debug-1.11.0.gemspec +0 -25
  207. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/debug-1.11.0.gemspec +0 -30
  208. package/lib/ruby/gems/3.4.0/gems/debug-1.11.0/debug.gemspec +0 -33
  209. package/lib/ruby/gems/3.4.0/gems/drb-2.2.1/drb.gemspec +0 -41
  210. package/lib/ruby/gems/3.4.0/gems/getoptlong-0.2.1/getoptlong.gemspec +0 -30
  211. package/lib/ruby/gems/3.4.0/gems/matrix-0.4.2/matrix.gemspec +0 -26
  212. package/lib/ruby/gems/3.4.0/gems/minitest-5.25.4/.autotest +0 -34
  213. package/lib/ruby/gems/3.4.0/gems/net-ftp-0.3.8/net-ftp.gemspec +0 -34
  214. package/lib/ruby/gems/3.4.0/gems/net-imap-0.5.15/net-imap.gemspec +0 -38
  215. package/lib/ruby/gems/3.4.0/gems/net-pop-0.1.2/net-pop.gemspec +0 -32
  216. package/lib/ruby/gems/3.4.0/gems/net-smtp-0.5.1/net-smtp.gemspec +0 -31
  217. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/.bundled.nkf-0.2.0.gemspec +0 -24
  218. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/nkf-0.2.0.gemspec +0 -24
  219. package/lib/ruby/gems/3.4.0/gems/nkf-0.2.0/nkf.gemspec +0 -43
  220. package/lib/ruby/gems/3.4.0/gems/observer-0.1.2/observer.gemspec +0 -32
  221. package/lib/ruby/gems/3.4.0/gems/power_assert-2.0.5/power_assert.gemspec +0 -24
  222. package/lib/ruby/gems/3.4.0/gems/prime-0.1.3/prime.gemspec +0 -28
  223. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/.bundled.racc-1.8.1.gemspec +0 -26
  224. package/lib/ruby/gems/3.4.0/gems/racc-1.8.1/racc-1.8.1.gemspec +0 -26
  225. package/lib/ruby/gems/3.4.0/gems/rake-13.2.1/rake.gemspec +0 -101
  226. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/.bundled.rbs-3.8.0.gemspec +0 -25
  227. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/.rubocop.yml +0 -53
  228. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/rbs-3.8.0.gemspec +0 -29
  229. package/lib/ruby/gems/3.4.0/gems/rbs-3.8.0/rbs.gemspec +0 -49
  230. package/lib/ruby/gems/3.4.0/gems/resolv-replace-0.1.1/resolv-replace.gemspec +0 -22
  231. package/lib/ruby/gems/3.4.0/gems/rinda-0.2.0/rinda.gemspec +0 -35
  232. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/.bundled.syslog-0.2.0.gemspec +0 -23
  233. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/syslog-0.2.0.gemspec +0 -23
  234. package/lib/ruby/gems/3.4.0/gems/syslog-0.2.0/syslog.gemspec +0 -26
  235. package/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/typeprof.gemspec +0 -32
@@ -0,0 +1,27 @@
1
+ #include <ruby/ruby.h>
2
+
3
+ #ifdef HAVE_RUBY_ATOMIC_H
4
+ # include <ruby/atomic.h>
5
+ #endif
6
+
7
+ #ifdef RUBY_ATOMIC_PTR_CAS
8
+ # define ATOMIC_PTR_CAS(var, old, new) RUBY_ATOMIC_PTR_CAS(var, old, new)
9
+ #endif
10
+
11
+ #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
12
+ /* GCC warns about unknown sanitizer, which is annoying. */
13
+ # undef NO_SANITIZE
14
+ # define NO_SANITIZE(x, y) \
15
+ _Pragma("GCC diagnostic push") \
16
+ _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
17
+ __attribute__((__no_sanitize__(x))) y; \
18
+ _Pragma("GCC diagnostic pop")
19
+ #endif
20
+
21
+ #undef strtod
22
+ #define strtod BigDecimal_strtod
23
+ #undef dtoa
24
+ #define dtoa BigDecimal_dtoa
25
+ #undef hdtoa
26
+ #define hdtoa BigDecimal_hdtoa
27
+ #include "missing/dtoa.c"
@@ -0,0 +1,196 @@
1
+ #ifndef MISSING_H
2
+ #define MISSING_H 1
3
+
4
+ #if defined(__cplusplus)
5
+ extern "C" {
6
+ #if 0
7
+ } /* satisfy cc-mode */
8
+ #endif
9
+ #endif
10
+
11
+ #ifdef HAVE_STDLIB_H
12
+ # include <stdlib.h>
13
+ #endif
14
+
15
+ #ifdef HAVE_MATH_H
16
+ # include <math.h>
17
+ #endif
18
+
19
+ #ifndef RB_UNUSED_VAR
20
+ # if defined(_MSC_VER) && _MSC_VER >= 1911
21
+ # define RB_UNUSED_VAR(x) x [[maybe_unused]]
22
+
23
+ # elif defined(__has_cpp_attribute) && __has_cpp_attribute(maybe_unused)
24
+ # define RB_UNUSED_VAR(x) x [[maybe_unused]]
25
+
26
+ # elif defined(__has_c_attribute) && __has_c_attribute(maybe_unused)
27
+ # define RB_UNUSED_VAR(x) x [[maybe_unused]]
28
+
29
+ # elif defined(__GNUC__)
30
+ # define RB_UNUSED_VAR(x) x __attribute__ ((unused))
31
+
32
+ # else
33
+ # define RB_UNUSED_VAR(x) x
34
+ # endif
35
+ #endif /* RB_UNUSED_VAR */
36
+
37
+ #if defined(_MSC_VER) && _MSC_VER >= 1310
38
+ # define HAVE___ASSUME 1
39
+
40
+ #elif defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1300
41
+ # define HAVE___ASSUME 1
42
+ #endif
43
+
44
+ #ifndef UNREACHABLE
45
+ # if __has_builtin(__builtin_unreachable)
46
+ # define UNREACHABLE __builtin_unreachable()
47
+
48
+ # elif defined(HAVE___ASSUME)
49
+ # define UNREACHABLE __assume(0)
50
+
51
+ # else
52
+ # define UNREACHABLE /* unreachable */
53
+ # endif
54
+ #endif /* UNREACHABLE */
55
+
56
+ /* bool */
57
+
58
+ #if defined(__bool_true_false_are_defined)
59
+ # /* Take that. */
60
+
61
+ #elif defined(HAVE_STDBOOL_H)
62
+ # include <stdbool.h>
63
+
64
+ #else
65
+ typedef unsigned char _Bool;
66
+ # define bool _Bool
67
+ # define true ((_Bool)+1)
68
+ # define false ((_Bool)-1)
69
+ # define __bool_true_false_are_defined
70
+ #endif
71
+
72
+ /* abs */
73
+
74
+ #ifndef HAVE_LABS
75
+ static inline long
76
+ labs(long const x)
77
+ {
78
+ if (x < 0) return -x;
79
+ return x;
80
+ }
81
+ #endif
82
+
83
+ #ifndef HAVE_LLABS
84
+ static inline LONG_LONG
85
+ llabs(LONG_LONG const x)
86
+ {
87
+ if (x < 0) return -x;
88
+ return x;
89
+ }
90
+ #endif
91
+
92
+ #ifdef vabs
93
+ # undef vabs
94
+ #endif
95
+ #if SIZEOF_VALUE <= SIZEOF_INT
96
+ # define vabs abs
97
+ #elif SIZEOF_VALUE <= SIZEOF_LONG
98
+ # define vabs labs
99
+ #elif SIZEOF_VALUE <= SIZEOF_LONG_LONG
100
+ # define vabs llabs
101
+ #endif
102
+
103
+ /* finite */
104
+
105
+ #ifndef HAVE_FINITE
106
+ static int
107
+ finite(double)
108
+ {
109
+ return !isnan(n) && !isinf(n);
110
+ }
111
+ #endif
112
+
113
+ #ifndef isfinite
114
+ # ifndef HAVE_ISFINITE
115
+ # define HAVE_ISFINITE 1
116
+ # define isfinite(x) finite(x)
117
+ # endif
118
+ #endif
119
+
120
+ /* dtoa */
121
+ char *BigDecimal_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
122
+
123
+ /* rational */
124
+
125
+ #ifndef HAVE_RB_RATIONAL_NUM
126
+ static inline VALUE
127
+ rb_rational_num(VALUE rat)
128
+ {
129
+ #ifdef RRATIONAL
130
+ return RRATIONAL(rat)->num;
131
+ #else
132
+ return rb_funcall(rat, rb_intern("numerator"), 0);
133
+ #endif
134
+ }
135
+ #endif
136
+
137
+ #ifndef HAVE_RB_RATIONAL_DEN
138
+ static inline VALUE
139
+ rb_rational_den(VALUE rat)
140
+ {
141
+ #ifdef RRATIONAL
142
+ return RRATIONAL(rat)->den;
143
+ #else
144
+ return rb_funcall(rat, rb_intern("denominator"), 0);
145
+ #endif
146
+ }
147
+ #endif
148
+
149
+ /* complex */
150
+
151
+ #ifndef HAVE_RB_COMPLEX_REAL
152
+ static inline VALUE
153
+ rb_complex_real(VALUE cmp)
154
+ {
155
+ #ifdef RCOMPLEX
156
+ return RCOMPLEX(cmp)->real;
157
+ #else
158
+ return rb_funcall(cmp, rb_intern("real"), 0);
159
+ #endif
160
+ }
161
+ #endif
162
+
163
+ #ifndef HAVE_RB_COMPLEX_IMAG
164
+ static inline VALUE
165
+ rb_complex_imag(VALUE cmp)
166
+ {
167
+ # ifdef RCOMPLEX
168
+ return RCOMPLEX(cmp)->imag;
169
+ # else
170
+ return rb_funcall(cmp, rb_intern("imag"), 0);
171
+ # endif
172
+ }
173
+ #endif
174
+
175
+ /* st */
176
+
177
+ #ifndef ST2FIX
178
+ # undef RB_ST2FIX
179
+ # define RB_ST2FIX(h) LONG2FIX((long)(h))
180
+ # define ST2FIX(h) RB_ST2FIX(h)
181
+ #endif
182
+
183
+ /* warning */
184
+
185
+ #if !defined(HAVE_RB_CATEGORY_WARN) || !defined(HAVE_CONST_RB_WARN_CATEGORY_DEPRECATED)
186
+ # define rb_category_warn(category, ...) rb_warn(__VA_ARGS__)
187
+ #endif
188
+
189
+ #if defined(__cplusplus)
190
+ #if 0
191
+ { /* satisfy cc-mode */
192
+ #endif
193
+ } /* extern "C" { */
194
+ #endif
195
+
196
+ #endif /* MISSING_H */
@@ -0,0 +1,54 @@
1
+ #ifndef BIGDECIMAL_STATIC_ASSERT_H
2
+ #define BIGDECIMAL_STATIC_ASSERT_H
3
+
4
+ #include "feature.h"
5
+
6
+ #ifdef HAVE_RUBY_INTERNAL_STATIC_ASSERT_H
7
+ # include <ruby/internal/static_assert.h>
8
+ #endif
9
+
10
+ #ifdef RBIMPL_STATIC_ASSERT
11
+ # define STATIC_ASSERT RBIMPL_STATIC_ASSERT
12
+ #endif
13
+
14
+ #ifndef STATIC_ASSERT
15
+ # /* The following section is copied from CRuby's static_assert.h */
16
+
17
+ # if defined(__cplusplus) && defined(__cpp_static_assert)
18
+ # /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
19
+ # define BIGDECIMAL_STATIC_ASSERT0 static_assert
20
+
21
+ # elif defined(__cplusplus) && defined(_MSC_VER) && _MSC_VER >= 1600
22
+ # define BIGDECIMAL_STATIC_ASSERT0 static_assert
23
+
24
+ # elif defined(__INTEL_CXX11_MODE__)
25
+ # define BIGDECIMAL_STATIC_ASSERT0 static_assert
26
+
27
+ # elif defined(__cplusplus) && __cplusplus >= 201103L
28
+ # define BIGDECIMAL_STATIC_ASSERT0 static_assert
29
+
30
+ # elif defined(__cplusplus) && __has_extension(cxx_static_assert)
31
+ # define BIGDECIMAL_STATIC_ASSERT0 __extension__ static_assert
32
+
33
+ # elif defined(__STDC_VERSION__) && __has_extension(c_static_assert)
34
+ # define BIGDECIMAL_STATIC_ASSERT0 __extension__ _Static_assert
35
+
36
+ # elif defined(__STDC_VERSION__) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
37
+ # define BIGDECIMAL_STATIC_ASSERT0 __extension__ _Static_assert
38
+ #endif
39
+
40
+ # if defined(__DOXYGEN__)
41
+ # define STATIC_ASSERT static_assert
42
+
43
+ # elif defined(BIGDECIMAL_STATIC_ASSERT0)
44
+ # define STATIC_ASSERT(name, expr) \
45
+ BIGDECIMAL_STATIC_ASSERT0(expr, #name ": " #expr)
46
+
47
+ # else
48
+ # define STATIC_ASSERT(name, expr) \
49
+ typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
50
+ # endif
51
+ #endif /* STATIC_ASSERT */
52
+
53
+
54
+ #endif /* BIGDECIMAL_STATIC_ASSERT_H */
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # Exit cleanly from an early interrupt
5
+ Signal.trap("INT") do
6
+ Bundler.ui.debug("\n#{caller.join("\n")}") if defined?(Bundler)
7
+ exit 1
8
+ end
9
+
10
+ base_path = File.expand_path("../lib", __dir__)
11
+
12
+ if File.exist?(base_path)
13
+ $LOAD_PATH.unshift(base_path)
14
+ end
15
+
16
+ require "bundler"
17
+
18
+ require "bundler/friendly_errors"
19
+
20
+ Bundler.with_friendly_errors do
21
+ require "bundler/cli"
22
+
23
+ # Allow any command to use --help flag to show help for that command
24
+ help_flags = %w[--help -h]
25
+ help_flag_used = ARGV.any? {|a| help_flags.include? a }
26
+ args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
27
+
28
+ Bundler::CLI.start(args, debug: true)
29
+ end
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ load File.expand_path("bundle", __dir__)
@@ -0,0 +1,228 @@
1
+
2
+ #include "ruby/ruby.h"
3
+ #include "ruby/debug.h"
4
+ #include "ruby/encoding.h"
5
+ #include "debug_version.h"
6
+ //
7
+ static VALUE rb_mDebugger;
8
+
9
+ // iseq
10
+ typedef struct rb_iseq_struct rb_iseq_t;
11
+ const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
12
+ VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
13
+
14
+ static VALUE
15
+ iseq_realpath(VALUE iseqw)
16
+ {
17
+ return rb_iseq_realpath(rb_iseqw_to_iseq(iseqw));
18
+ }
19
+
20
+ static VALUE rb_cFrameInfo;
21
+
22
+ static VALUE
23
+ di_entry(VALUE loc, VALUE self, VALUE binding, VALUE iseq, VALUE klass, VALUE depth)
24
+ {
25
+ return rb_struct_new(rb_cFrameInfo,
26
+ // :location, :self, :binding, :iseq, :class, :frame_depth,
27
+ loc, self, binding, iseq, klass, depth,
28
+ // :has_return_value, :return_value,
29
+ Qnil, Qnil,
30
+ // :has_raised_exception, :raised_exception,
31
+ Qnil, Qnil,
32
+ // :show_line, :local_variables
33
+ Qnil,
34
+ // :_local_variables, :_callee # for recorder
35
+ Qnil, Qnil,
36
+ // :dupped_binding
37
+ Qnil
38
+ );
39
+ }
40
+
41
+ static int
42
+ str_start_with(VALUE str, VALUE prefix)
43
+ {
44
+ StringValue(prefix);
45
+ rb_enc_check(str, prefix);
46
+ if (RSTRING_LEN(str) >= RSTRING_LEN(prefix) &&
47
+ memcmp(RSTRING_PTR(str), RSTRING_PTR(prefix), RSTRING_LEN(prefix)) == 0) {
48
+ return 1;
49
+ }
50
+ else {
51
+ return 0;
52
+ }
53
+ }
54
+
55
+ static VALUE
56
+ di_body(const rb_debug_inspector_t *dc, void *ptr)
57
+ {
58
+ VALUE skip_path_prefix = (VALUE)ptr;
59
+ VALUE locs = rb_debug_inspector_backtrace_locations(dc);
60
+ VALUE ary = rb_ary_new();
61
+ long len = RARRAY_LEN(locs);
62
+ long i;
63
+
64
+ for (i=1; i<len; i++) {
65
+ VALUE e;
66
+ VALUE iseq = rb_debug_inspector_frame_iseq_get(dc, i);
67
+ VALUE loc = RARRAY_AREF(locs, i);
68
+ VALUE path;
69
+
70
+ if (!NIL_P(iseq)) {
71
+ path = iseq_realpath(iseq);
72
+ }
73
+ else {
74
+ // C frame
75
+ path = rb_funcall(loc, rb_intern("path"), 0);
76
+ }
77
+
78
+ if (!NIL_P(path) && !NIL_P(skip_path_prefix) && str_start_with(path, skip_path_prefix)) {
79
+ continue;
80
+ }
81
+
82
+ e = di_entry(loc,
83
+ rb_debug_inspector_frame_self_get(dc, i),
84
+ rb_debug_inspector_frame_binding_get(dc, i),
85
+ iseq,
86
+ rb_debug_inspector_frame_class_get(dc, i),
87
+ #ifdef RB_DEBUG_INSPECTOR_FRAME_DEPTH
88
+ rb_debug_inspector_frame_depth(dc, i)
89
+ #else
90
+ INT2FIX(len - i)
91
+ #endif
92
+ );
93
+ rb_ary_push(ary, e);
94
+ }
95
+
96
+ return ary;
97
+ }
98
+
99
+ static VALUE
100
+ capture_frames(VALUE self, VALUE skip_path_prefix)
101
+ {
102
+ return rb_debug_inspector_open(di_body, (void *)skip_path_prefix);
103
+ }
104
+
105
+ #ifdef RB_DEBUG_INSPECTOR_FRAME_DEPTH
106
+ static VALUE
107
+ frame_depth(VALUE self)
108
+ {
109
+ return rb_debug_inspector_current_depth();
110
+ }
111
+ #else
112
+ static VALUE
113
+ frame_depth(VALUE self)
114
+ {
115
+ // TODO: more efficient API
116
+ VALUE bt = rb_make_backtrace();
117
+ return INT2FIX(RARRAY_LEN(bt));
118
+ }
119
+ #endif
120
+
121
+
122
+ // iseq
123
+
124
+ const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
125
+
126
+ #ifdef HAVE_RB_ISEQ_TYPE
127
+ VALUE rb_iseq_type(const rb_iseq_t *);
128
+
129
+ static VALUE
130
+ iseq_type(VALUE iseqw)
131
+ {
132
+ const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
133
+ return rb_iseq_type(iseq);
134
+ }
135
+ #endif
136
+
137
+ #ifdef HAVE_RB_ISEQ_PARAMETERS
138
+ VALUE rb_iseq_parameters(const rb_iseq_t *, int is_proc);
139
+
140
+ static VALUE
141
+ iseq_parameters_symbols(VALUE iseqw)
142
+ {
143
+ const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
144
+ VALUE params = rb_iseq_parameters(iseq, 0);
145
+ VALUE ary = rb_ary_new();
146
+
147
+ static VALUE sym_ast, sym_astast, sym_amp;
148
+
149
+ if (sym_ast == 0) {
150
+ sym_ast = ID2SYM(rb_intern("*"));
151
+ sym_astast = ID2SYM(rb_intern("**"));
152
+ sym_amp = ID2SYM(rb_intern("&"));
153
+ }
154
+
155
+ for (long i=0; i<RARRAY_LEN(params); i++) {
156
+ VALUE e = RARRAY_AREF(params, i);
157
+ if (RARRAY_LEN(e) == 2) {
158
+ VALUE sym = RARRAY_AREF(e, 1);
159
+ if (sym != sym_ast &&
160
+ sym != sym_astast &&
161
+ sym != sym_amp) rb_ary_push(ary, RARRAY_AREF(e, 1));
162
+ }
163
+ }
164
+
165
+ return ary;
166
+ }
167
+ #endif
168
+
169
+ #ifdef HAVE_RB_ISEQ_CODE_LOCATION
170
+ void rb_iseq_code_location(const rb_iseq_t *, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
171
+
172
+ static VALUE
173
+ iseq_first_line(VALUE iseqw)
174
+ {
175
+ const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
176
+ int line;
177
+ rb_iseq_code_location(iseq, &line, NULL, NULL, NULL);
178
+ return INT2NUM(line);
179
+ }
180
+
181
+ static VALUE
182
+ iseq_last_line(VALUE iseqw)
183
+ {
184
+ const rb_iseq_t *iseq = rb_iseqw_to_iseq(iseqw);
185
+ int line;
186
+ rb_iseq_code_location(iseq, NULL, NULL, &line, NULL);
187
+ return INT2NUM(line);
188
+ }
189
+ #endif
190
+
191
+ #ifdef HAVE_RB_ISEQ
192
+ void Init_iseq_collector(void);
193
+ #endif
194
+
195
+ void
196
+ Init_debug(void)
197
+ {
198
+ #ifdef HAVE_RB_ISEQ
199
+ VALUE rb_mRubyVM = rb_const_get(rb_cObject, rb_intern("RubyVM"));
200
+ VALUE rb_cISeq = rb_const_get(rb_mRubyVM, rb_intern("InstructionSequence"));
201
+ #endif
202
+ rb_mDebugger = rb_const_get(rb_cObject, rb_intern("DEBUGGER__"));
203
+ rb_cFrameInfo = rb_const_get(rb_mDebugger, rb_intern("FrameInfo"));
204
+
205
+ // Debugger and FrameInfo were defined in Ruby. We need to register them
206
+ // as mark objects so they are automatically pinned.
207
+ rb_gc_register_mark_object(rb_mDebugger);
208
+ rb_gc_register_mark_object(rb_cFrameInfo);
209
+ rb_define_singleton_method(rb_mDebugger, "capture_frames", capture_frames, 1);
210
+ rb_define_singleton_method(rb_mDebugger, "frame_depth", frame_depth, 0);
211
+ rb_define_const(rb_mDebugger, "SO_VERSION", rb_str_new2(RUBY_DEBUG_VERSION));
212
+
213
+ // iseq
214
+ #ifdef HAVE_RB_ISEQ_TYPE
215
+ rb_define_method(rb_cISeq, "type", iseq_type, 0);
216
+ #endif
217
+ #ifdef HAVE_RB_ISEQ_PARAMETERS
218
+ rb_define_method(rb_cISeq, "parameters_symbols", iseq_parameters_symbols, 0);
219
+ #endif
220
+ #ifdef HAVE_RB_ISEQ_CODE_LOCATION
221
+ rb_define_method(rb_cISeq, "first_line", iseq_first_line, 0);
222
+ rb_define_method(rb_cISeq, "last_line", iseq_last_line, 0);
223
+ #endif
224
+
225
+ #ifdef HAVE_RB_ISEQ
226
+ Init_iseq_collector();
227
+ #endif
228
+ }
@@ -0,0 +1,27 @@
1
+ require 'mkmf'
2
+ require_relative '../../lib/debug/version'
3
+ File.write("debug_version.h", "#define RUBY_DEBUG_VERSION \"#{DEBUGGER__::VERSION}\"\n")
4
+ $distcleanfiles << "debug_version.h"
5
+
6
+ if defined? RubyVM
7
+ $defs << '-DHAVE_RB_ISEQ'
8
+ $defs << '-DHAVE_RB_ISEQ_PARAMETERS'
9
+ $defs << '-DHAVE_RB_ISEQ_CODE_LOCATION'
10
+
11
+ if RUBY_VERSION >= '3.1.0'
12
+ $defs << '-DHAVE_RB_ISEQ_TYPE'
13
+ end
14
+ else
15
+ # not on MRI
16
+
17
+ have_func "rb_iseq_parameters(NULL, 0)",
18
+ [["VALUE rb_iseq_parameters(void *, int is_proc);"]]
19
+
20
+ have_func "rb_iseq_code_location(NULL, NULL, NULL, NULL, NULL)",
21
+ [["void rb_iseq_code_location(void *, int *first_lineno, int *first_column, int *last_lineno, int *last_column);"]]
22
+ # from Ruby 3.1
23
+ have_func "rb_iseq_type(NULL)",
24
+ [["VALUE rb_iseq_type(void *);"]]
25
+ end
26
+
27
+ create_makefile 'debug/debug'
@@ -0,0 +1,93 @@
1
+ #include <ruby/ruby.h>
2
+
3
+ #ifdef HAVE_RB_ISEQ
4
+ VALUE rb_iseqw_new(VALUE v);
5
+ void rb_objspace_each_objects(
6
+ int (*callback)(void *start, void *end, size_t stride, void *data),
7
+ void *data);
8
+ size_t rb_obj_memsize_of(VALUE);
9
+
10
+ // implementation specific.
11
+ enum imemo_type {
12
+ imemo_iseq = 7,
13
+ imemo_mask = 0x07
14
+ };
15
+
16
+ static inline enum imemo_type
17
+ imemo_type(VALUE imemo)
18
+ {
19
+ return (RBASIC(imemo)->flags >> FL_USHIFT) & imemo_mask;
20
+ }
21
+
22
+ static inline int
23
+ rb_obj_is_iseq(VALUE iseq)
24
+ {
25
+ return RB_TYPE_P(iseq, T_IMEMO) && imemo_type(iseq) == imemo_iseq;
26
+ }
27
+
28
+ struct iseq_i_data {
29
+ void (*func)(VALUE v, void *data);
30
+ void *data;
31
+ };
32
+
33
+ int
34
+ iseq_i(void *vstart, void *vend, size_t stride, void *ptr)
35
+ {
36
+ VALUE v;
37
+ struct iseq_i_data *data = (struct iseq_i_data *)ptr;
38
+
39
+ for (v = (VALUE)vstart; v != (VALUE)vend; v += stride) {
40
+ if (RBASIC(v)->flags) {
41
+ switch (BUILTIN_TYPE(v)) {
42
+ case T_IMEMO:
43
+ if (rb_obj_is_iseq(v)) {
44
+ data->func(v, data->data);
45
+ }
46
+ continue;
47
+ default:
48
+ continue;
49
+ }
50
+ }
51
+ }
52
+
53
+ return 0;
54
+ }
55
+
56
+ static void
57
+ each_iseq_i(VALUE v, void *ptr)
58
+ {
59
+ rb_yield(rb_iseqw_new(v));
60
+ }
61
+
62
+ static VALUE
63
+ each_iseq(VALUE self)
64
+ {
65
+ struct iseq_i_data data = {each_iseq_i, NULL};
66
+ rb_objspace_each_objects(iseq_i, &data);
67
+ return Qnil;
68
+ }
69
+
70
+ static void
71
+ count_iseq_i(VALUE v, void *ptr)
72
+ {
73
+ size_t *sizep = (size_t *)ptr;
74
+ *sizep += 1;
75
+ }
76
+
77
+ static VALUE
78
+ count_iseq(VALUE self)
79
+ {
80
+ size_t size = 0;
81
+ struct iseq_i_data data = {count_iseq_i, &size};
82
+ rb_objspace_each_objects(iseq_i, &data);
83
+ return SIZET2NUM(size);
84
+ }
85
+
86
+ void
87
+ Init_iseq_collector(void)
88
+ {
89
+ VALUE rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
90
+ rb_define_singleton_method(rb_mObjSpace, "each_iseq", each_iseq, 0);
91
+ rb_define_singleton_method(rb_mObjSpace, "count_iseq", count_iseq, 0);
92
+ }
93
+ #endif