code_ownership 2.1.0 → 2.1.1

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 (227) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +8 -14
  3. data/ext/cargo-vendor/magnus-0.8.2/.cargo-checksum.json +1 -0
  4. data/ext/cargo-vendor/magnus-0.8.2/.cargo_vcs_info.json +6 -0
  5. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/CHANGELOG.md +66 -1
  6. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/Cargo.lock +243 -9
  7. data/ext/cargo-vendor/magnus-0.8.2/Cargo.toml +277 -0
  8. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/Cargo.toml.orig +11 -6
  9. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/README.md +75 -23
  10. data/ext/cargo-vendor/magnus-0.8.2/build.rs +15 -0
  11. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/complete_object/test/temperature_test.rb +4 -4
  12. data/ext/cargo-vendor/magnus-0.8.2/examples/inheritance.rs +66 -0
  13. data/ext/cargo-vendor/magnus-0.8.2/examples/mut_point.rs +116 -0
  14. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/api.rs +4 -3
  15. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/class.rs +9 -7
  16. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/encoding.rs +5 -5
  17. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/error.rs +12 -3
  18. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/fiber.rs +5 -5
  19. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/gc.rs +3 -3
  20. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/integer.rs +134 -0
  21. data/ext/cargo-vendor/magnus-0.8.2/src/io.rs +230 -0
  22. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/lib.rs +53 -54
  23. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/macros.rs +2 -2
  24. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/method.rs +14 -100
  25. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/module.rs +1 -1
  26. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/mutex.rs +1 -1
  27. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_array.rs +2 -2
  28. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_bignum.rs +100 -3
  29. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_hash.rs +63 -1
  30. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_string.rs +31 -231
  31. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_typed_data.rs +6 -9
  32. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/rb_sys.rs +4 -4
  33. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/scan_args.rs +3 -3
  34. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/thread.rs +16 -10
  35. data/ext/cargo-vendor/magnus-0.8.2/src/time.rs +462 -0
  36. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/try_convert.rs +64 -2
  37. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/typed_data.rs +113 -11
  38. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/value/flonum.rs +1 -1
  39. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/value.rs +83 -6
  40. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/test +1 -1
  41. data/ext/cargo-vendor/magnus-0.8.2/tests/hash.rs +44 -0
  42. data/ext/cargo-vendor/magnus-0.8.2/tests/io.rs +62 -0
  43. data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/return_iter.rs +1 -1
  44. data/ext/cargo-vendor/magnus-0.8.2/tests/string.rs +23 -0
  45. data/ext/cargo-vendor/magnus-0.8.2/tests/time.rs +71 -0
  46. data/ext/cargo-vendor/magnus-macros-0.8.0/.cargo-checksum.json +1 -0
  47. data/ext/cargo-vendor/magnus-macros-0.8.0/.cargo_vcs_info.json +6 -0
  48. data/ext/cargo-vendor/magnus-macros-0.8.0/Cargo.lock +47 -0
  49. data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/Cargo.toml +10 -1
  50. data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/Cargo.toml.orig +1 -1
  51. data/ext/cargo-vendor/magnus-macros-0.8.0/src/lib.rs +545 -0
  52. data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/src/typed_data.rs +3 -3
  53. data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/src/util.rs +1 -1
  54. data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo-checksum.json +1 -0
  55. data/ext/cargo-vendor/serde_magnus-0.10.0/.cargo_vcs_info.json +6 -0
  56. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/Cargo.lock +77 -75
  57. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/Cargo.toml +3 -3
  58. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/Cargo.toml.orig +7 -4
  59. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/README.md +8 -5
  60. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/array_deserializer.rs +12 -8
  61. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/array_enumerator.rs +12 -7
  62. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/deserializer.rs +21 -18
  63. data/ext/cargo-vendor/serde_magnus-0.10.0/src/de/enum_deserializer.rs +35 -0
  64. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/hash_deserializer.rs +18 -11
  65. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/mod.rs +76 -76
  66. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/de/variant_deserializer.rs +10 -9
  67. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/error.rs +10 -4
  68. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/lib.rs +6 -5
  69. data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/enums.rs +11 -0
  70. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/map_serializer.rs +11 -12
  71. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/mod.rs +53 -50
  72. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/seq_serializer.rs +11 -10
  73. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/src/ser/serializer.rs +50 -34
  74. data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/struct_serializer.rs +40 -0
  75. data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/struct_variant_serializer.rs +45 -0
  76. data/ext/cargo-vendor/serde_magnus-0.10.0/src/ser/tuple_variant_serializer.rs +38 -0
  77. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_arrays.rs +3 -3
  78. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_booleans.rs +15 -0
  79. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_enums.rs +39 -0
  80. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_floats.rs +12 -0
  81. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_integers.rs +18 -0
  82. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_maps.rs +3 -2
  83. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_options.rs +15 -0
  84. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_results.rs +17 -0
  85. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_strings.rs +7 -7
  86. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_structs.rs +9 -9
  87. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/deserializing_tuples.rs +27 -0
  88. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/deserializing_vecs.rs +3 -3
  89. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_arrays.rs +3 -3
  90. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/serializing_booleans.rs +15 -0
  91. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_enums.rs +9 -7
  92. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_floats.rs +2 -2
  93. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_integers.rs +4 -4
  94. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_maps.rs +3 -2
  95. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_options.rs +3 -3
  96. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_results.rs +5 -4
  97. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/serializing_strings.rs +30 -0
  98. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_structs.rs +15 -7
  99. data/ext/cargo-vendor/serde_magnus-0.10.0/tests/serializing_tuples.rs +35 -0
  100. data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/tests/serializing_vecs.rs +3 -3
  101. data/ext/code_ownership/Cargo.toml +2 -2
  102. data/ext/code_ownership/extconf.rb +2 -1
  103. data/ext/code_ownership/src/lib.rs +16 -16
  104. data/lib/code_ownership/cli.rb +1 -0
  105. data/lib/code_ownership/private/file_path_finder.rb +3 -7
  106. data/lib/code_ownership/private/file_path_team_cache.rb +5 -9
  107. data/lib/code_ownership/private/for_file_output_builder.rb +0 -1
  108. data/lib/code_ownership/private/team_finder.rb +8 -14
  109. data/lib/code_ownership/version.rb +2 -2
  110. data/lib/code_ownership.rb +12 -17
  111. metadata +182 -186
  112. data/ext/cargo-vendor/magnus-0.7.1/.cargo-checksum.json +0 -1
  113. data/ext/cargo-vendor/magnus-0.7.1/.cargo_vcs_info.json +0 -6
  114. data/ext/cargo-vendor/magnus-0.7.1/Cargo.toml +0 -95
  115. data/ext/cargo-vendor/magnus-0.7.1/build.rs +0 -5
  116. data/ext/cargo-vendor/magnus-0.7.1/examples/mut_point.rs +0 -60
  117. data/ext/cargo-vendor/magnus-0.7.1/src/time.rs +0 -190
  118. data/ext/cargo-vendor/magnus-0.7.1/tests/hash.rs +0 -25
  119. data/ext/cargo-vendor/magnus-0.7.1/tests/string.rs +0 -13
  120. data/ext/cargo-vendor/magnus-macros-0.6.0/.cargo-checksum.json +0 -1
  121. data/ext/cargo-vendor/magnus-macros-0.6.0/.cargo_vcs_info.json +0 -6
  122. data/ext/cargo-vendor/magnus-macros-0.6.0/src/lib.rs +0 -401
  123. data/ext/cargo-vendor/rb-sys-env-0.1.2/.cargo-checksum.json +0 -1
  124. data/ext/cargo-vendor/rb-sys-env-0.1.2/.cargo_vcs_info.json +0 -6
  125. data/ext/cargo-vendor/rb-sys-env-0.1.2/Cargo.toml +0 -25
  126. data/ext/cargo-vendor/rb-sys-env-0.1.2/Cargo.toml.orig +0 -14
  127. data/ext/cargo-vendor/rb-sys-env-0.1.2/LICENSE-APACHE +0 -190
  128. data/ext/cargo-vendor/rb-sys-env-0.1.2/LICENSE-MIT +0 -21
  129. data/ext/cargo-vendor/rb-sys-env-0.1.2/readme.md +0 -119
  130. data/ext/cargo-vendor/rb-sys-env-0.1.2/src/defines.rs +0 -37
  131. data/ext/cargo-vendor/rb-sys-env-0.1.2/src/lib.rs +0 -180
  132. data/ext/cargo-vendor/rb-sys-env-0.1.2/src/rb_env.rs +0 -110
  133. data/ext/cargo-vendor/rb-sys-env-0.1.2/src/ruby_version.rs +0 -163
  134. data/ext/cargo-vendor/rb-sys-env-0.1.2/src/utils.rs +0 -6
  135. data/ext/cargo-vendor/serde_magnus-0.9.0/.cargo-checksum.json +0 -1
  136. data/ext/cargo-vendor/serde_magnus-0.9.0/.cargo_vcs_info.json +0 -6
  137. data/ext/cargo-vendor/serde_magnus-0.9.0/src/de/enum_deserializer.rs +0 -30
  138. data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/enums.rs +0 -11
  139. data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/struct_serializer.rs +0 -36
  140. data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/struct_variant_serializer.rs +0 -37
  141. data/ext/cargo-vendor/serde_magnus-0.9.0/src/ser/tuple_variant_serializer.rs +0 -33
  142. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_booleans.rs +0 -18
  143. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_enums.rs +0 -39
  144. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_floats.rs +0 -12
  145. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_integers.rs +0 -18
  146. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_options.rs +0 -15
  147. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_results.rs +0 -17
  148. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/deserializing_tuples.rs +0 -31
  149. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/serializing_booleans.rs +0 -15
  150. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/serializing_strings.rs +0 -30
  151. data/ext/cargo-vendor/serde_magnus-0.9.0/tests/serializing_tuples.rs +0 -27
  152. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/.cargo/config.toml +0 -0
  153. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/Gemfile +0 -0
  154. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/LICENSE +0 -0
  155. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/complete_object/Rakefile +0 -0
  156. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/complete_object/lib/temperature.rb +0 -0
  157. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/Rakefile +0 -0
  158. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/lib/ahriman/error.rb +0 -0
  159. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/lib/ahriman.rb +0 -0
  160. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_ruby/test/error_test.rb +0 -0
  161. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_rust/Rakefile +0 -0
  162. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_rust/lib/ahriman.rb +0 -0
  163. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/custom_exception_rust/test/error_test.rb +0 -0
  164. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/fibonacci.rs +0 -0
  165. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/hello_world.rs +0 -0
  166. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/point.rs +0 -0
  167. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/Rakefile +0 -0
  168. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/lib/rust_blank.rb +0 -0
  169. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/test/bench.rb +0 -0
  170. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/examples/rust_blank/test/blank_test.rb +0 -0
  171. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/block.rs +0 -0
  172. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/embed.rs +0 -0
  173. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/enumerator.rs +0 -0
  174. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/exception.rs +0 -0
  175. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/float.rs +0 -0
  176. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/into_value.rs +0 -0
  177. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/numeric.rs +0 -0
  178. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/object.rs +0 -0
  179. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/process.rs +0 -0
  180. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_complex.rs +0 -0
  181. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_file.rs +0 -0
  182. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_float.rs +0 -0
  183. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_match.rs +0 -0
  184. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_object.rs +0 -0
  185. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_rational.rs +0 -0
  186. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_regexp.rs +0 -0
  187. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/r_struct.rs +0 -0
  188. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/range.rs +0 -0
  189. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/src/symbol.rs +0 -0
  190. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/allocate_before_init.rs +0 -0
  191. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/array_slice.rs +0 -0
  192. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/block_call.rs +0 -0
  193. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/bytes.rs +0 -0
  194. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/call_proc.rs +0 -0
  195. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/classname.rs +0 -0
  196. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/clone.rs +0 -0
  197. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/codepoints.rs +0 -0
  198. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/debug_exception.rs +0 -0
  199. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/encoding_capable.rs +0 -0
  200. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/enumerator.rs +0 -0
  201. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/enumeratorize.rs +0 -0
  202. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/float_convert_from_value.rs +0 -0
  203. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/float_convert_to_value.rs +0 -0
  204. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/fmt.rs +0 -0
  205. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/freeze.rs +0 -0
  206. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/integer_convert_to_value.rs +0 -0
  207. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/integer_traits.rs +0 -0
  208. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/ivar.rs +0 -0
  209. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/lazy_id.rs +0 -0
  210. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/make_proc.rs +0 -0
  211. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/proc_new.rs +0 -0
  212. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/range.rs +0 -0
  213. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/return_custom_error.rs +0 -0
  214. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/scan_args.rs +0 -0
  215. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/str.rs +0 -0
  216. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/struct.rs +0 -0
  217. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/symbol.rs +0 -0
  218. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/try_convert_array.rs +0 -0
  219. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/tuple_to_array.rs +0 -0
  220. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data.rs +0 -0
  221. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data_obj.rs +0 -0
  222. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data_subclass.rs +0 -0
  223. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/typed_data_subclass_from_ruby.rs +0 -0
  224. /data/ext/cargo-vendor/{magnus-0.7.1 → magnus-0.8.2}/tests/yield.rs +0 -0
  225. /data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/LICENSE +0 -0
  226. /data/ext/cargo-vendor/{magnus-macros-0.6.0 → magnus-macros-0.8.0}/src/init.rs +0 -0
  227. /data/ext/cargo-vendor/{serde_magnus-0.9.0 → serde_magnus-0.10.0}/LICENSE +0 -0
@@ -0,0 +1,230 @@
1
+ //! Types and functions for working with Ruby IO semantics in Rust.
2
+ //!
3
+ //! This module provides safe wrappers and accessors for working with Ruby's IO system,
4
+ //! including file open flags (`OpenFlags`), mode flags (`FMode`), and encoding metadata
5
+ //! (`IoEncoding`).
6
+
7
+ #[cfg(ruby_lt_3_3)]
8
+ use rb_sys::rb_io_enc_t as rb_io_encoding;
9
+ #[cfg(ruby_gt_3_4)]
10
+ use rb_sys::rb_io_mode;
11
+ #[cfg(ruby_gte_3_3)]
12
+ use rb_sys::{rb_io_encoding, FMODE_EXTERNAL};
13
+ use rb_sys::{
14
+ rb_io_extract_modeenc, OnigEncodingTypeST, FMODE_APPEND, FMODE_BINMODE, FMODE_CREATE,
15
+ FMODE_DUPLEX, FMODE_EXCL, FMODE_READABLE, FMODE_READWRITE, FMODE_SETENC_BY_BOM, FMODE_SYNC,
16
+ FMODE_TEXTMODE, FMODE_TRUNC, FMODE_TTY, FMODE_WRITABLE, VALUE,
17
+ };
18
+
19
+ use crate::{
20
+ encoding::{Encoding, RbEncoding},
21
+ error::{protect, Error},
22
+ value::{private::ReprValue as _, ReprValue, Value},
23
+ RHash, Ruby,
24
+ };
25
+
26
+ /// Wrapper for Ruby's file open flag bits (`O_*`).
27
+ #[derive(Debug, Clone, Copy, PartialEq, Eq)]
28
+ pub struct OpenFlags(pub i32);
29
+
30
+ impl OpenFlags {
31
+ /// Constructs a new set of open flags.
32
+ pub fn new(bits: i32) -> Self {
33
+ Self(bits)
34
+ }
35
+
36
+ /// Returns the raw flag bits.
37
+ pub fn bits(&self) -> i32 {
38
+ self.0
39
+ }
40
+
41
+ /// Checks if a particular flag is set.
42
+ pub fn contains(&self, flag: i32) -> bool {
43
+ self.0 & flag != 0
44
+ }
45
+ }
46
+
47
+ /// Ruby IO mode flags (`FMODE_*`), used to describe how a file or stream is opened.
48
+ ///
49
+ /// These are internal Ruby VM flags describing the open mode and encoding behavior
50
+ /// of an IO stream.
51
+ #[derive(Debug, Clone, Copy, PartialEq, Eq)]
52
+ pub struct FMode(u32);
53
+
54
+ #[cfg(ruby_lt_3_3)]
55
+ const FMODE_EXTERNAL: u32 = 65536; // this was FMODE_PREP. rb-sys doesn't include this binding.
56
+
57
+ impl FMode {
58
+ /// File is opened as readable (`"r"`, `"r+"`, etc.)
59
+ pub const READ: u32 = FMODE_READABLE;
60
+ /// File is opened as writable (`"w"`, `"a"`, `"r+"`, etc.)
61
+ pub const WRITE: u32 = FMODE_WRITABLE;
62
+ /// File is readable and writable (`"r+"`, `"w+"`, etc.)
63
+ pub const READ_WRITE: u32 = FMODE_READWRITE;
64
+ /// File is opened in binary mode (`"b"` modifier)
65
+ ///
66
+ /// Disables newline conversions and sets default external encoding to ASCII-8BIT.
67
+ pub const BINARY_MODE: u32 = FMODE_BINMODE;
68
+ /// File is opened with sync mode (`IO#sync = true`)
69
+ pub const SYNC: u32 = FMODE_SYNC;
70
+ /// The stream is connected to a terminal/TTY
71
+ pub const TTY: u32 = FMODE_TTY;
72
+ /// Duplex stream — supports both input and output on a single handle
73
+ pub const DUPLEX: u32 = FMODE_DUPLEX;
74
+ /// Append mode — all writes go to the end of the file
75
+ pub const APPEND: u32 = FMODE_APPEND;
76
+ /// Create mode — file is created if it doesn't exist
77
+ pub const CREATE: u32 = FMODE_CREATE;
78
+ /// Exclusive mode — fail if file exists
79
+ pub const EXCLUSIVE: u32 = FMODE_EXCL;
80
+ /// Truncate the file to 0 bytes on open
81
+ pub const TRUNCATE: u32 = FMODE_TRUNC;
82
+ /// File is opened in text mode (`"t"` modifier)
83
+ ///
84
+ /// Affects encoding and newline translation on some platforms.
85
+ pub const TEXT_MODE: u32 = FMODE_TEXTMODE;
86
+ /// External encoding explicitly specified
87
+ pub const EXTERNAL_ENCODING: u32 = FMODE_EXTERNAL;
88
+ /// Set encoding by inspecting BOM (Byte Order Mark)
89
+ pub const BOM_ENCODING: u32 = FMODE_SETENC_BY_BOM;
90
+
91
+ /// Constructs a new `FMode` from raw bits.
92
+ pub fn new(bits: u32) -> Self {
93
+ Self(bits)
94
+ }
95
+
96
+ /// Check if a given flag is set.
97
+ pub fn contains(&self, flag: u32) -> bool {
98
+ self.0 & flag != 0
99
+ }
100
+
101
+ /// Returns the raw flag bits.
102
+ pub fn bits(&self) -> u32 {
103
+ self.0
104
+ }
105
+ }
106
+
107
+ /// Ruby-owned encoding metadata extracted from IO options.
108
+ ///
109
+ /// This struct represents the result of parsing Ruby's file mode string and encoding-related
110
+ /// options (e.g., `:external_encoding`, `:internal_encoding`, or `:encoding`) using the
111
+ /// internal Ruby C API `rb_io_extract_modeenc`.
112
+ ///
113
+ /// The data here includes both Ruby-side encodings and flags that affect transcoding behavior,
114
+ /// such as BOM handling or newline modes. The optional `options` hash contains additional
115
+ /// transcoding options as a Ruby `Hash`.
116
+ ///
117
+ /// # Example
118
+ ///
119
+ /// ```rust
120
+ /// # use magnus::{Ruby, Value, RHash};
121
+ /// # fn parse_encoding(ruby: &Ruby, mode: &mut Value, perm: &mut Value, options: &RHash) {
122
+ /// let (_, _, encoding) = ruby.io_extract_modeenc(mode, perm, options).unwrap();
123
+ ///
124
+ /// if let Some(ext) = &encoding.external {
125
+ /// println!("External encoding: {}", ext);
126
+ /// }
127
+ ///
128
+ /// if let Some(hash) = &encoding.options {
129
+ /// println!("Encoding options: {:?}", hash);
130
+ /// }
131
+ /// # }
132
+ /// ```
133
+ ///
134
+ /// # Safety
135
+ ///
136
+ /// This struct should **not be stored beyond the stack frame** in which it was created.
137
+ /// The Ruby VM may deallocate or reuse internal objects such as the `options` hash,
138
+ /// which is **not automatically GC-pinned**. Copying this structure beyond a single
139
+ /// call boundary can lead to undefined behavior or use-after-free.
140
+ ///
141
+ /// Always extract the fields you need and clone or persist Ruby values separately if necessary.
142
+ pub struct IoEncoding {
143
+ /// The external encoding used for reading/writing to the file or stream.
144
+ pub external: Option<Encoding>,
145
+ /// The internal encoding used for transcoding, if any.
146
+ pub internal: Option<Encoding>,
147
+ /// Encoding flags describing transcoding behavior (e.g., whether to
148
+ /// use BOM detection, or newline modes).
149
+ pub flags: i32,
150
+ /// A Ruby hash of encoding options passed in by the user, if present.
151
+ pub options: Option<RHash>,
152
+ }
153
+
154
+ /// # IO helper functions
155
+ ///
156
+ /// See also [`IoEncoding`] type and [`FMode`] type.
157
+ impl Ruby {
158
+ /// Extract open flags and IO encoding metadata from a Ruby method call.
159
+ ///
160
+ /// This wraps Ruby's `rb_io_extract_modeenc` function, which parses `mode`, `perm`, and `options`
161
+ /// into a combination of open flags, mode flags, and encoding metadata.
162
+ ///
163
+ /// Can raise:
164
+ /// - `TypeError` if passed unexpected objects (e.g., `Time`)
165
+ /// - `ArgError` if conflicting options are provided
166
+ pub fn io_extract_modeenc(
167
+ &self,
168
+ mode: &mut Value,
169
+ permission: &mut Value,
170
+ option: &RHash,
171
+ ) -> Result<(OpenFlags, FMode, IoEncoding), Error> {
172
+ // `rb_io_extract_modeenc` will fill these variables:
173
+ let mut oflags: std::os::raw::c_int = 0; // with O_ flags; flags are available in `File::Constants`.
174
+ #[cfg(ruby_lte_3_4)]
175
+ let mut fmode: std::os::raw::c_int = 0; // with FMODE_ flags
176
+ #[cfg(ruby_gt_3_4)]
177
+ let mut fmode: rb_io_mode = rb_io_mode::RUBY_IO_MODE_EXTERNAL; // arbitrary initialization value
178
+ let mut io_encoding: rb_io_encoding = unsafe { std::mem::zeroed() }; // with IO encoding options
179
+
180
+ // Can raise:
181
+ // - `TypeError`: Unexpected object (e.g. Time) passed.
182
+ // - `ArgError`: Contradiction inside of params.
183
+ protect(|| unsafe {
184
+ rb_io_extract_modeenc(
185
+ &mut mode.as_rb_value() as *mut _,
186
+ &mut permission.as_rb_value() as *mut _,
187
+ option.as_rb_value(),
188
+ &mut oflags as *mut _,
189
+ &mut fmode as *mut _,
190
+ &mut io_encoding as *mut _,
191
+ );
192
+ self.qnil()
193
+ })?;
194
+
195
+ // `rb_io_extract_modeenc` populated the values
196
+ let open_flags = OpenFlags::new(oflags as i32);
197
+ let fmode_flags = FMode::new(fmode as u32);
198
+
199
+ // extracts and starts to manage objects for better user experience
200
+ let internal: Option<Encoding> = {
201
+ let ptr = io_encoding.enc as *mut OnigEncodingTypeST;
202
+ RbEncoding::new(ptr).map(|r| r.into())
203
+ };
204
+
205
+ let external: Option<Encoding> = {
206
+ let ptr = io_encoding.enc2 as *mut OnigEncodingTypeST;
207
+ RbEncoding::new(ptr).map(|r| r.into())
208
+ };
209
+
210
+ let flags = io_encoding.ecflags;
211
+
212
+ let options = {
213
+ let value = Value::new(io_encoding.ecopts as VALUE);
214
+ if value.is_nil() {
215
+ None
216
+ } else {
217
+ RHash::from_value(value)
218
+ }
219
+ };
220
+
221
+ let io_encoding = IoEncoding {
222
+ external,
223
+ internal,
224
+ flags,
225
+ options,
226
+ };
227
+
228
+ Ok((open_flags, fmode_flags, io_encoding))
229
+ }
230
+ }
@@ -1,4 +1,4 @@
1
- //! Magnus is a library for writing Ruby extentions in Rust, or running Ruby
1
+ //! Magnus is a library for writing Ruby extensions in Rust, or running Ruby
2
2
  //! code from Rust.
3
3
  //!
4
4
  //! # Overview
@@ -345,19 +345,19 @@
345
345
  //!
346
346
  //! ## `rb_c`
347
347
  //!
348
- //! * `rb_call_super`: See [`call_super`].
349
- //! * `rb_call_super_kw`: [`call_super`].
348
+ //! * `rb_call_super`: See [`Ruby::call_super`].
349
+ //! * `rb_call_super_kw`: [`Ruby::call_super`].
350
350
  // * `rb_catch`:
351
351
  // * `rb_catch_obj`:
352
352
  // * `rb_category_compile_warn`:
353
353
  // * `rb_category_warn`:
354
354
  // * `rb_category_warning`:
355
355
  // * `rb_char_to_option_kcode`:
356
- //! * `rb_check_arity`: [`scan_args::check_arity`].
356
+ //! * `rb_check_arity`: [`Ruby::check_arity`].
357
357
  //! * `rb_check_array_type`: See [`TryConvert`] and [`Value::try_convert`].
358
358
  // * `rb_check_convert_type`:
359
359
  // * `rb_check_copyable`:
360
- // * `rb_check_frozen`:
360
+ //! * `rb_check_frozen`: See [`ReprValue::check_frozen`].
361
361
  // * `rb_check_frozen_inline`:
362
362
  //! * `rb_check_funcall`: See [`Value::check_funcall`].
363
363
  //! * `rb_check_funcall_kw`: [`Value::check_funcall`].
@@ -366,11 +366,11 @@
366
366
  //! * `rb_check_id_cstr`: [`Id::check`](value::Id::check).
367
367
  // * `rb_check_inheritable`:
368
368
  // * `rb_check_safe_str`:
369
- // * `rb_check_string_type`:
369
+ //! * `rb_check_string_type`: See [`TryConvert`] and [`Value::try_convert`].
370
370
  //! * `rb_check_symbol`: Similar to [`StaticSymbol::check`].
371
371
  //! * `rb_check_symbol_cstr`: [`StaticSymbol::check`].
372
- // * `rb_check_to_float`:
373
- // * `rb_check_to_int`:
372
+ //! * `rb_check_to_float`: See [`TryConvert`] and [`Value::try_convert`].
373
+ //! * `rb_check_to_int`: See [`TryConvert`] and [`Value::try_convert`].
374
374
  // * `rb_check_to_integer`:
375
375
  // * `rb_check_type`:
376
376
  //! * `rb_check_typeddata`: See [`TryConvert`] and [`Value::try_convert`].
@@ -380,7 +380,7 @@
380
380
  // * `rb_class_get_superclass`:
381
381
  // * `rb_class_inherited_p`: [`Module::is_inherited`].
382
382
  // * `rb_class_instance_methods`:
383
- //! * `rb_class_name`: Simmilar to [`Value::classname`].
383
+ //! * `rb_class_name`: Similar to [`Value::classname`].
384
384
  //! * `rb_class_new`: [`RClass::new`].
385
385
  //! * `rb_class_new_instance`: See [`RClass::new_instance`].
386
386
  //! * `rb_class_new_instance_kw`: [`RClass::new_instance`].
@@ -447,7 +447,7 @@
447
447
  // * `rb_cstr2inum`:
448
448
  // * `rb_cstr_to_dbl`:
449
449
  // * `rb_cstr_to_inum`:
450
- //! * `rb_current_receiver`: [`current_receiver`].
450
+ //! * `rb_current_receiver`: [`Ruby::current_receiver`].
451
451
  // * `rb_cvar_defined`:
452
452
  // * `rb_cvar_find`:
453
453
  // * `rb_cvar_get`:
@@ -481,8 +481,8 @@
481
481
  //! * `rb_define_alias`: [`Module::define_alias`].
482
482
  // * `rb_define_alloc_func`:
483
483
  //! * `rb_define_attr`: See [`Module::define_attr`].
484
- //! * `rb_define_class`: [`define_class`].
485
- //! * `rb_define_class_id`: Simmilar to [`define_class`].
484
+ //! * `rb_define_class`: [`Ruby::define_class`].
485
+ //! * `rb_define_class_id`: Similar to [`Ruby::define_class`].
486
486
  //! * `rb_define_class_id_under`: [`Module::define_class`].
487
487
  //! * `rb_define_class_under`: See [`Module::define_class`].
488
488
  // * `rb_define_class_variable`:
@@ -490,20 +490,20 @@
490
490
  // * `rb_define_dummy_encoding`:
491
491
  // * `rb_define_finalizer`:
492
492
  // * `rb_define_global_const`:
493
- //! * `rb_define_global_function`: [`define_global_function`].
493
+ //! * `rb_define_global_function`: [`Ruby::define_global_function`].
494
494
  // * `rb_define_hooked_variable`:
495
495
  //! * `rb_define_method`: See [`Module::define_method`].
496
496
  //! * `rb_define_method_id`: [`Module::define_method`].
497
- //! * `rb_define_module`: [`define_module`].
497
+ //! * `rb_define_module`: [`Ruby::define_module`].
498
498
  //! * `rb_define_module_function`: [`RModule::define_module_function`].
499
- //! * `rb_define_module_id`: See [`define_module`].
499
+ //! * `rb_define_module_id`: See [`Ruby::define_module`].
500
500
  //! * `rb_define_module_id_under`: [`Module::define_module`].
501
501
  //! * `rb_define_module_under`: See [`Module::define_module`].
502
502
  //! * `rb_define_private_method`: [`Module::define_private_method`].
503
503
  //! * `rb_define_protected_method`: [`Module::define_protected_method`].
504
504
  // * `rb_define_readonly_variable`:
505
505
  //! * `rb_define_singleton_method`: [`Object::define_singleton_method`].
506
- //! * `rb_define_variable`: [`define_variable`].
506
+ //! * `rb_define_variable`: [`Ruby::define_variable`].
507
507
  // * `rb_define_virtual_variable`:
508
508
  // * `rb_deprecate_constant`:
509
509
  // * `rb_detach_process`:
@@ -658,7 +658,7 @@
658
658
  //! * `rb_eval_string`: See [`eval()`] or [`eval!`].
659
659
  //! * `rb_eval_string_protect`: [`eval()`] or [`eval!`].
660
660
  // * `rb_eval_string_wrap`:
661
- // * `rb_exc_fatal`:
661
+ //! * `rb_exc_fatal`: Return an [`Error`] constructed from [`Ruby::exception_fatal`].
662
662
  // * `rb_exc_new`:
663
663
  // * `rb_exc_new_cstr`:
664
664
  // * `rb_exc_new_str`:
@@ -812,13 +812,13 @@
812
812
  //!
813
813
  //! ## `rb_g`
814
814
  //!
815
- //! * `rb_gc`: [`gc::start`].
816
- //! * `rb_gc_adjust_memory_usage`: [`gc::adjust_memory_usage`].
815
+ //! * `rb_gc`: [`Ruby::gc_start`].
816
+ //! * `rb_gc_adjust_memory_usage`: [`Ruby::gc_adjust_memory_usage`].
817
817
  // * `rb_gc_call_finalizer_at_exit`:
818
818
  // * `rb_gc_copy_finalizer`:
819
- //! * `rb_gc_count`: [`gc::count`].
820
- //! * `rb_gc_disable`: [`gc::disable`].
821
- //! * `rb_gc_enable`: [`gc::enable`].
819
+ //! * `rb_gc_count`: [`Ruby::gc_count`].
820
+ //! * `rb_gc_disable`: [`Ruby::gc_disable`].
821
+ //! * `rb_gc_enable`: [`Ruby::gc_enable`].
822
822
  // * `RB_GC_GUARD`:
823
823
  // * `rb_gc_latest_gc_info`:
824
824
  //! * `rb_gc_location`: [`gc::Compactor::location`].
@@ -829,12 +829,12 @@
829
829
  //! * `rb_gc_register_address`: [`gc::register_address`] or
830
830
  //! [`BoxValue`](value::BoxValue).
831
831
  //! * `rb_gc_register_mark_object`: [`gc::register_mark_object`].
832
- //! * `rb_gc_start`: [`gc::start`].
833
- //! * `rb_gc_stat`: [`gc::stat`] or [`gc::all_stats`].
832
+ //! * `rb_gc_start`: [`Ruby::gc_start`].
833
+ //! * `rb_gc_stat`: [`Ruby::gc_stat`] or [`Ruby::gc_all_stats`].
834
834
  //! * `rb_gc_unregister_address`: [`gc::unregister_address`].
835
835
  // * `rb_gc_update_tbl_refs`:
836
- // * `rb_gc_writebarrier`:
837
- // * `rb_gc_writebarrier_unprotect`:
836
+ //! * `rb_gc_writebarrier`: [`typed_data::Writebarrier::writebarrier`].
837
+ //! * `rb_gc_writebarrier_unprotect`: [`typed_data::Writebarrier::writebarrier_unprotect`].
838
838
  // * `rb_generic_ivar_table`:
839
839
  // * `rb_genrand_int32`:
840
840
  // * `rb_genrand_real`:
@@ -932,7 +932,7 @@
932
932
  // * `rb_io_descriptor`:
933
933
  // * `rb_io_eof`:
934
934
  // * `rb_io_extract_encoding_option`:
935
- // * `rb_io_extract_modeenc`:
935
+ //! * `rb_io_extract_modeenc`: [`Ruby::io_extract_modeenc`].
936
936
  // * `rb_io_fdopen`:
937
937
  // * `rb_io_flush`:
938
938
  // * `rb_io_fptr_finalize`:
@@ -1114,10 +1114,6 @@
1114
1114
  // * `rb_native_mutex_unlock`:
1115
1115
  // * `rb_need_block`:
1116
1116
  // * `RB_NEGFIXABLE`:
1117
- // * `RB_NEWOBJ`:
1118
- // * `rb_newobj`:
1119
- // * `RB_NEWOBJ_OF`:
1120
- // * `rb_newobj_of`:
1121
1117
  // * `RB_NIL_P`:
1122
1118
  // * `rb_nogvl`:
1123
1119
  // * `rb_notimplement`:
@@ -1253,7 +1249,7 @@
1253
1249
  // * `rb_ractor_stdin_set`:
1254
1250
  // * `rb_ractor_stdout`:
1255
1251
  // * `rb_ractor_stdout_set`:
1256
- //! * `rb_raise`: Simmilar to returning [`Error`].
1252
+ //! * `rb_raise`: Similar to returning [`Error`].
1257
1253
  // * `rb_random_base_init`:
1258
1254
  // * `rb_random_bytes`:
1259
1255
  // * `RB_RANDOM_DATA_INIT_PARENT`:
@@ -1311,8 +1307,8 @@
1311
1307
  // * `rb_remove_event_hook_with_data`:
1312
1308
  // * `rb_remove_method`:
1313
1309
  // * `rb_remove_method_id`:
1314
- //! * `rb_require`: [`require`].
1315
- //! * `rb_require_string`: [`require`].
1310
+ //! * `rb_require`: [`Ruby::require`].
1311
+ //! * `rb_require_string`: [`Ruby::require`].
1316
1312
  // * `rb_rescue`:
1317
1313
  // * `rb_rescue2`:
1318
1314
  // * `RB_RESERVED_FD_P`:
@@ -1413,10 +1409,10 @@
1413
1409
  //! * `rb_str_new`: [`RString::from_slice`].
1414
1410
  // * `rb_str_new_cstr`:
1415
1411
  //! * `rb_str_new_frozen`: [`RString::new_frozen`].
1416
- //! * `rb_str_new_lit`: Simmilar to [`r_string!`].
1417
- //! * `rb_str_new_literal`: Simmilar to [`r_string!`].
1412
+ //! * `rb_str_new_lit`: Similar to [`r_string!`].
1413
+ //! * `rb_str_new_literal`: Similar to [`r_string!`].
1418
1414
  //! * `rb_str_new_shared`: [`RString::new_shared`].
1419
- // * `rb_str_new_static`: Simmilar to [`r_string!`].
1415
+ // * `rb_str_new_static`: Similar to [`r_string!`].
1420
1416
  // * `rb_str_new_with_class`:
1421
1417
  //! * `rb_str_offset`: [`RString::offset`].
1422
1418
  //! * `rb_str_plus`: [`RString::plus`].
@@ -1540,13 +1536,13 @@
1540
1536
  // * `rb_throw_obj`:
1541
1537
  // * `rb_timespec_now`:
1542
1538
  // * `rb_time_interval`:
1543
- // * `rb_time_nano_new`:
1539
+ //! * `rb_time_nano_new`: [`Ruby::time_nano_new`].
1544
1540
  //! * `rb_time_new`: [`Ruby::time_new`].
1545
1541
  // * `rb_time_num_new`:
1546
- // * `rb_time_timespec`:
1542
+ //! * `rb_time_timespec`: See [`Time::timespec`].
1547
1543
  // * `rb_time_timespec_interval`:
1548
- // * `rb_time_timespec_new`:
1549
- //! * `rb_time_timeval`: [`TryConvert`].
1544
+ //! * `rb_time_timespec_new`: [`Ruby::time_timespec_new`].
1545
+ // * `rb_time_timeval`:
1550
1546
  //! * `rb_time_utc_offset`: [`Time::utc_offset`].
1551
1547
  // * `rb_tolower`:
1552
1548
  // * `rb_toupper`:
@@ -1610,8 +1606,8 @@
1610
1606
  //! * `rb_utf8_encoding`: [`RbEncoding::utf8`](encoding::RbEncoding::utf8).
1611
1607
  //! * `rb_utf8_str_new`: [`RString::new`].
1612
1608
  //! * `rb_utf8_str_new_cstr`: See [`RString::new`].
1613
- //! * `rb_utf8_str_new_lit`: Simmilar to [`r_string!`].
1614
- //! * `rb_utf8_str_new_literal`: Simmilar to [`r_string!`].
1609
+ //! * `rb_utf8_str_new_lit`: Similar to [`r_string!`].
1610
+ //! * `rb_utf8_str_new_literal`: Similar to [`r_string!`].
1615
1611
  //! * `rb_utf8_str_new_static`: [`r_string!`].
1616
1612
  // * `rb_uv_to_utf8`:
1617
1613
  //!
@@ -1622,19 +1618,19 @@
1622
1618
  // * `rb_w32_fd_dup`:
1623
1619
  //! * `rb_waitpid`: [`Ruby::waitpid`].
1624
1620
  // * `rb_warn`:
1625
- //! * `rb_warning`: [`error::warning`].
1621
+ //! * `rb_warning`: [`Ruby::warning`].
1626
1622
  // * `rb_write_error`:
1627
1623
  // * `rb_write_error2`:
1628
- //! * `rb_yield`: [`block::yield_value`] / return [`block::Yield`].
1624
+ //! * `rb_yield`: [`Ruby::yield_value`] / return [`block::Yield`].
1629
1625
  // * `rb_yield_block`:
1630
- //! * `rb_yield_splat`: [`block::yield_splat`] / return [`block::YieldSplat`].
1626
+ //! * `rb_yield_splat`: [`Ruby::yield_splat`] / return [`block::YieldSplat`].
1631
1627
  // * `rb_yield_splat_kw`:
1632
1628
  //! * `rb_yield_values`:
1633
- //! See [`block::yield_values`] / return [`block::YieldValues`].
1629
+ //! See [`Ruby::yield_values`] / return [`block::YieldValues`].
1634
1630
  //! * `rb_yield_values2`:
1635
- //! See [`block::yield_values`] / return [`block::YieldValues`].
1631
+ //! See [`Ruby::yield_values`] / return [`block::YieldValues`].
1636
1632
  //! * `rb_yield_values_kw`:
1637
- //! [`block::yield_values`] / return [`block::YieldValues`].
1633
+ //! [`Ruby::yield_values`] / return [`block::YieldValues`].
1638
1634
  // * `RB_ZALLOC`:
1639
1635
  // * `RB_ZALLOC_N`:
1640
1636
  //!
@@ -1740,11 +1736,11 @@
1740
1736
  // * `ruby_scan_digits`:
1741
1737
  // * `ruby_scan_hex`:
1742
1738
  // * `ruby_scan_oct`:
1743
- //! * `ruby_script`: Similar to [`embed::ruby_script`].
1739
+ //! * `ruby_script`: Similar to [`Ruby::script`].
1744
1740
  // * `ruby_setenv`:
1745
1741
  //! * `ruby_setup`: [`embed::setup`].
1746
1742
  // * `ruby_set_argv`:
1747
- //! * `ruby_set_script_name`: [`embed::ruby_script`].
1743
+ //! * `ruby_set_script_name`: [`Ruby::script`].
1748
1744
  // * `ruby_show_copyright`:
1749
1745
  // * `ruby_show_version`:
1750
1746
  // * `ruby_signal_name`:
@@ -1808,6 +1804,9 @@ mod float;
1808
1804
  pub mod gc;
1809
1805
  mod integer;
1810
1806
  mod into_value;
1807
+ #[cfg(feature = "io")]
1808
+ #[cfg_attr(docsrs, doc(cfg(feature = "io")))]
1809
+ pub mod io;
1811
1810
  pub mod method;
1812
1811
  pub mod module;
1813
1812
  mod mutex;
@@ -1842,7 +1841,7 @@ pub mod rb_sys;
1842
1841
  pub mod scan_args;
1843
1842
  pub mod symbol;
1844
1843
  mod thread;
1845
- mod time;
1844
+ pub mod time;
1846
1845
  pub mod try_convert;
1847
1846
  pub mod typed_data;
1848
1847
  pub mod value;
@@ -2183,9 +2182,9 @@ impl Ruby {
2183
2182
 
2184
2183
  /// Alias the global variable `src` as `dst`.
2185
2184
  ///
2186
- /// Unlike [`define_variable`](Ruby::define_variable), the preceeding `$`
2185
+ /// Unlike [`define_variable`](Ruby::define_variable), the preceding `$`
2187
2186
  /// of the global variable's name is required, otherwise the alias will not
2188
- /// be accessable from Ruby.
2187
+ /// be accessible from Ruby.
2189
2188
  ///
2190
2189
  /// # Examples
2191
2190
  ///
@@ -6,7 +6,7 @@ macro_rules! debug_assert_value {
6
6
  ($value:expr) => {
7
7
  // The memory this points to is managed by Ruby's GC and we can't
8
8
  // really know if it's safe to access as with GC compaction this may
9
- // point to memory now outside that owned by the process. We will likly
9
+ // point to memory now outside that owned by the process. We will likely
10
10
  // segfault in that case, which is kind of OK, as we're trying to panic
11
11
  // anyway.
12
12
  #[allow(unused_unsafe)]
@@ -30,7 +30,7 @@ macro_rules! debug_assert_value {
30
30
  ///
31
31
  /// The check is currently not performed in release mode as the Ruby API
32
32
  /// hasn't been finalised and there isn't an alternative to this that avoids
33
- /// the check and the associated perfomance hit.
33
+ /// the check and the associated performance hit.
34
34
  macro_rules! get_ruby {
35
35
  () => {
36
36
  if cfg!(debug_assertions) {