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
@@ -589,7 +589,7 @@ impl RString {
589
589
 
590
590
  /// Create a new Ruby string that is a frozen copy of `s`.
591
591
  ///
592
- /// This can be used to get a copy of a string that is guranteed not to be
592
+ /// This can be used to get a copy of a string that is guaranteed not to be
593
593
  /// modified while you are referencing it.
594
594
  ///
595
595
  /// # Examples
@@ -622,7 +622,7 @@ impl RString {
622
622
  /// ensure this does not happen.
623
623
  ///
624
624
  /// Ruby must not be allowed to garbage collect or modify `self` while a
625
- /// refrence to the slice is held.
625
+ /// reference to the slice is held.
626
626
  ///
627
627
  /// # Examples
628
628
  ///
@@ -632,7 +632,7 @@ impl RString {
632
632
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
633
633
  /// let s = ruby.str_new("example");
634
634
  /// // safe as we don't give Ruby the chance to mess with the string while
635
- /// // we hold a refrence to the slice.
635
+ /// // we hold a reference to the slice.
636
636
  /// unsafe { assert_eq!(s.as_slice(), [101, 120, 97, 109, 112, 108, 101]) };
637
637
  ///
638
638
  /// Ok(())
@@ -680,7 +680,7 @@ impl RString {
680
680
  /// }
681
681
  /// # Ruby::init(example).unwrap()
682
682
  /// ```
683
- pub unsafe fn codepoints(&self) -> Codepoints {
683
+ pub unsafe fn codepoints(&self) -> Codepoints<'_> {
684
684
  Codepoints {
685
685
  slice: self.as_slice(),
686
686
  encoding: self.enc_get().into(),
@@ -724,7 +724,7 @@ impl RString {
724
724
  /// }
725
725
  /// # Ruby::init(example).unwrap()
726
726
  /// ```
727
- pub unsafe fn char_bytes(&self) -> CharBytes {
727
+ pub unsafe fn char_bytes(&self) -> CharBytes<'_> {
728
728
  CharBytes {
729
729
  slice: self.as_slice(),
730
730
  encoding: self.enc_get().into(),
@@ -800,7 +800,7 @@ impl RString {
800
800
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
801
801
  /// let s: RString = eval!(ruby, r#""café".encode("ISO-8859-1")"#)?;
802
802
  /// // safe as we don't give Ruby the chance to mess with the string while
803
- /// // we hold a refrence to the slice.
803
+ /// // we hold a reference to the slice.
804
804
  /// unsafe { assert_eq!(s.as_slice(), &[99, 97, 102, 233]) };
805
805
  /// let e = s.conv_enc(ruby.utf8_encoding())?;
806
806
  /// unsafe { assert_eq!(e.as_slice(), &[99, 97, 102, 195, 169]) };
@@ -1034,7 +1034,7 @@ impl RString {
1034
1034
  /// ensure this does not happen.
1035
1035
  ///
1036
1036
  /// Ruby must not be allowed to garbage collect or modify `self` while a
1037
- /// refrence to the str is held.
1037
+ /// reference to the str is held.
1038
1038
  ///
1039
1039
  /// # Examples
1040
1040
  ///
@@ -1044,7 +1044,7 @@ impl RString {
1044
1044
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
1045
1045
  /// let s = ruby.str_new("example");
1046
1046
  /// // safe as we don't give Ruby the chance to mess with the string while
1047
- /// // we hold a refrence to the slice.
1047
+ /// // we hold a reference to the slice.
1048
1048
  /// unsafe { assert_eq!(s.test_as_str().unwrap(), "example") };
1049
1049
  ///
1050
1050
  /// Ok(())
@@ -1067,7 +1067,7 @@ impl RString {
1067
1067
  /// ensure this does not happen.
1068
1068
  ///
1069
1069
  /// Ruby must not be allowed to garbage collect or modify `self` while a
1070
- /// refrence to the str is held.
1070
+ /// reference to the str is held.
1071
1071
  ///
1072
1072
  /// # Examples
1073
1073
  ///
@@ -1077,7 +1077,7 @@ impl RString {
1077
1077
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
1078
1078
  /// let s = ruby.str_new("example");
1079
1079
  /// // safe as we don't give Ruby the chance to mess with the string while
1080
- /// // we hold a refrence to the slice.
1080
+ /// // we hold a reference to the slice.
1081
1081
  /// unsafe { assert_eq!(s.as_str()?, "example") };
1082
1082
  ///
1083
1083
  /// Ok(())
@@ -1100,7 +1100,7 @@ impl RString {
1100
1100
 
1101
1101
  unsafe fn as_str_unconstrained<'a>(self) -> Result<&'a str, Error> {
1102
1102
  self.test_as_str_unconstrained().ok_or_else(|| {
1103
- let msg: Cow<'static, str> = if self.is_utf8_compatible_encoding() {
1103
+ let msg: Cow<'static, str> = if !self.is_utf8_compatible_encoding() {
1104
1104
  format!(
1105
1105
  "expected utf-8, got {}",
1106
1106
  RbEncoding::from(self.enc_get()).name()
@@ -1124,7 +1124,7 @@ impl RString {
1124
1124
  /// ensure this does not happen.
1125
1125
  ///
1126
1126
  /// Ruby must not be allowed to garbage collect or modify `self` while a
1127
- /// refrence to the str is held.
1127
+ /// reference to the str is held.
1128
1128
  ///
1129
1129
  /// # Examples
1130
1130
  ///
@@ -1134,7 +1134,7 @@ impl RString {
1134
1134
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
1135
1135
  /// let s = ruby.str_new("example");
1136
1136
  /// // safe as we don't give Ruby the chance to mess with the string while
1137
- /// // we hold a refrence to the slice.
1137
+ /// // we hold a reference to the slice.
1138
1138
  /// unsafe { assert_eq!(s.to_string_lossy(), "example") };
1139
1139
  ///
1140
1140
  /// Ok(())
@@ -1165,14 +1165,13 @@ impl RString {
1165
1165
  /// ```
1166
1166
  pub fn to_string(self) -> Result<String, Error> {
1167
1167
  let handle = Ruby::get_with(self);
1168
- let utf8 = if self.is_utf8_compatible_encoding() {
1169
- self
1170
- } else {
1171
- self.conv_enc(handle.utf8_encoding())?
1172
- };
1173
- str::from_utf8(unsafe { utf8.as_slice() })
1174
- .map(ToOwned::to_owned)
1175
- .map_err(|e| Error::new(handle.exception_encoding_error(), format!("{}", e)))
1168
+ unsafe {
1169
+ if let Some(str) = self.test_as_str() {
1170
+ Ok(str.to_owned())
1171
+ } else {
1172
+ Ok(self.conv_enc(handle.utf8_encoding())?.as_str()?.to_owned())
1173
+ }
1174
+ }
1176
1175
  }
1177
1176
 
1178
1177
  /// Returns `self` as an owned Rust `Bytes`.
@@ -1261,10 +1260,6 @@ impl RString {
1261
1260
  /// are usually string literals with the in files with the
1262
1261
  /// `# frozen_string_literal: true` 'magic comment'.
1263
1262
  ///
1264
- /// Interned strings won't be garbage collected or modified, so should be
1265
- /// safe to store on the heap or hold a `&str` refrence to. See
1266
- /// [`as_interned_str`](RString::as_interned_str).
1267
- ///
1268
1263
  /// # Examples
1269
1264
  ///
1270
1265
  /// ```
@@ -1303,61 +1298,22 @@ impl RString {
1303
1298
  }
1304
1299
  }
1305
1300
 
1306
- /// Returns `Some(FString)` if self is interned, `None` otherwise.
1307
- ///
1308
- /// Interned strings won't be garbage collected or modified, so should be
1309
- /// safe to store on the heap or hold a `&str` refrence to. The `FString`
1310
- /// type returned by this function provides a way to encode this property
1311
- /// into the type system, and provides safe methods to access the string
1312
- /// as a `&str` or slice.
1313
- ///
1314
- /// # Examples
1315
- ///
1316
- /// ```
1317
- /// use magnus::{eval, Error, RString, Ruby};
1318
- ///
1319
- /// fn example(ruby: &Ruby) -> Result<(), Error> {
1320
- /// let s: RString = eval!(
1321
- /// ruby,
1322
- /// r#"
1323
- /// ## frozen_string_literal: true
1324
- ///
1325
- /// "example"
1326
- /// "#
1327
- /// )?;
1328
- /// assert!(s.as_interned_str().is_some());
1329
- ///
1330
- /// Ok(())
1331
- /// }
1332
- /// # Ruby::init(example).unwrap()
1333
- /// ```
1301
+ /// Interns `self`, returning an interned string.
1334
1302
  ///
1335
- /// ```
1336
- /// use magnus::{eval, Error, RString, Ruby};
1303
+ /// Finds or creates an interned string, modifying `self` so that its
1304
+ /// parent is the returned string.
1337
1305
  ///
1338
- /// fn example(ruby: &Ruby) -> Result<(), Error> {
1339
- /// let s: RString = eval!(ruby, r#""example""#)?;
1340
- /// assert!(s.as_interned_str().is_none());
1341
- ///
1342
- /// Ok(())
1343
- /// }
1344
- /// # Ruby::init(example).unwrap()
1345
- /// ```
1346
- pub fn as_interned_str(self) -> Option<FString> {
1347
- self.is_interned().then(|| FString(self))
1348
- }
1349
-
1350
- /// Interns self and returns a [`FString`]. Be aware that once interned a
1351
- /// string will never be garbage collected.
1306
+ /// Interned strings with the same value will use the same backing memory.
1352
1307
  ///
1353
1308
  /// # Examples
1354
1309
  ///
1355
1310
  /// ```
1356
- /// use magnus::{Error, Ruby};
1311
+ /// use magnus::{rb_assert, Error, Ruby};
1357
1312
  ///
1358
1313
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
1359
- /// let fstring = ruby.str_new("example").to_interned_str();
1360
- /// assert_eq!(fstring.as_str()?, "example");
1314
+ /// let example = ruby.str_new("example");
1315
+ /// let interned = example.to_interned_str();
1316
+ /// rb_assert!("interned == example", interned, example);
1361
1317
  ///
1362
1318
  /// Ok(())
1363
1319
  /// }
@@ -1365,12 +1321,8 @@ impl RString {
1365
1321
  /// ```
1366
1322
  #[cfg(any(ruby_gte_3_0, docsrs))]
1367
1323
  #[cfg_attr(docsrs, doc(cfg(ruby_gte_3_0)))]
1368
- pub fn to_interned_str(self) -> FString {
1369
- unsafe {
1370
- FString(RString::from_rb_value_unchecked(rb_str_to_interned_str(
1371
- self.as_rb_value(),
1372
- )))
1373
- }
1324
+ pub fn to_interned_str(self) -> RString {
1325
+ unsafe { RString::from_rb_value_unchecked(rb_str_to_interned_str(self.as_rb_value())) }
1374
1326
  }
1375
1327
 
1376
1328
  /// Mutate `self`, adding `other` to the end. Errors if `self` and
@@ -1981,165 +1933,13 @@ impl TryConvert for RString {
1981
1933
  }
1982
1934
  }
1983
1935
 
1984
- /// FString contains an RString known to be interned.
1985
- ///
1986
- /// Interned strings won't be garbage collected or modified, so should be
1987
- /// safe to store on the heap or hold a `&str` refrence to. `FString` provides
1988
- /// a way to encode this property into the type system, and provides safe
1989
- /// methods to access the string as a `&str` or slice.
1990
- #[derive(Clone, Copy)]
1991
- #[repr(transparent)]
1992
- pub struct FString(RString);
1993
-
1994
- impl FString {
1995
- /// Returns the interned string as a [`RString`].
1996
- pub fn as_r_string(self) -> RString {
1997
- self.0
1998
- }
1999
-
2000
- /// Returns the interned string as a slice of bytes.
2001
- ///
2002
- /// # Examples
2003
- ///
2004
- /// ```
2005
- /// use magnus::{eval, Error, RString, Ruby};
2006
- ///
2007
- /// fn example(ruby: &Ruby) -> Result<(), Error> {
2008
- /// let s: RString = eval!(
2009
- /// ruby,
2010
- /// r#"
2011
- /// ## frozen_string_literal: true
2012
- ///
2013
- /// "example"
2014
- /// "#
2015
- /// )?;
2016
- /// let fstring = s.as_interned_str().unwrap();
2017
- /// assert_eq!(fstring.as_slice(), &[101, 120, 97, 109, 112, 108, 101]);
2018
- ///
2019
- /// Ok(())
2020
- /// }
2021
- /// # Ruby::init(example).unwrap()
2022
- /// ```
2023
- pub fn as_slice(self) -> &'static [u8] {
2024
- unsafe { self.as_r_string().as_slice_unconstrained() }
2025
- }
2026
-
2027
- /// Returns the interned string as a `&str` or `None` string contains
2028
- /// invliad UTF-8.
2029
- ///
2030
- /// # Examples
2031
- ///
2032
- /// ```
2033
- /// use magnus::{eval, Error, RString, Ruby};
2034
- ///
2035
- /// fn example(ruby: &Ruby) -> Result<(), Error> {
2036
- /// let s: RString = eval!(
2037
- /// ruby,
2038
- /// r#"
2039
- /// ## frozen_string_literal: true
2040
- ///
2041
- /// "example"
2042
- /// "#
2043
- /// )?;
2044
- /// let fstring = s.as_interned_str().unwrap();
2045
- /// assert_eq!(fstring.test_as_str().unwrap(), "example");
2046
- ///
2047
- /// Ok(())
2048
- /// }
2049
- /// # Ruby::init(example).unwrap()
2050
- /// ```
2051
- pub fn test_as_str(self) -> Option<&'static str> {
2052
- unsafe { self.as_r_string().test_as_str_unconstrained() }
2053
- }
2054
-
2055
- /// Returns the interned string as a `&str`. Errors if the string contains
2056
- /// invliad UTF-8.
2057
- ///
2058
- /// # Examples
2059
- ///
2060
- /// ```
2061
- /// use magnus::{eval, Error, RString, Ruby};
2062
- ///
2063
- /// fn example(ruby: &Ruby) -> Result<(), Error> {
2064
- /// let s: RString = eval!(
2065
- /// ruby,
2066
- /// r#"
2067
- /// ## frozen_string_literal: true
2068
- ///
2069
- /// "example"
2070
- /// "#
2071
- /// )?;
2072
- /// let fstring = s.as_interned_str().unwrap();
2073
- /// assert_eq!(fstring.as_str()?, "example");
2074
- ///
2075
- /// Ok(())
2076
- /// }
2077
- /// # Ruby::init(example).unwrap()
2078
- /// ```
2079
- pub fn as_str(self) -> Result<&'static str, Error> {
2080
- unsafe { self.as_r_string().as_str_unconstrained() }
2081
- }
2082
-
2083
- /// Returns interned string as a Rust string, ignoring the Ruby encoding
2084
- /// and dropping any non-UTF-8 characters. If the string is valid UTF-8
2085
- /// this will return a `&str` reference.
2086
- ///
2087
- /// # Examples
2088
- ///
2089
- /// ```
2090
- /// use magnus::{eval, Error, RString, Ruby};
2091
- ///
2092
- /// fn example(ruby: &Ruby) -> Result<(), Error> {
2093
- /// let s: RString = eval!(
2094
- /// ruby,
2095
- /// r#"
2096
- /// ## frozen_string_literal: true
2097
- ///
2098
- /// "example"
2099
- /// "#
2100
- /// )?;
2101
- /// let fstring = s.as_interned_str().unwrap();
2102
- /// assert_eq!(fstring.to_string_lossy(), "example");
2103
- ///
2104
- /// Ok(())
2105
- /// }
2106
- /// # Ruby::init(example).unwrap()
2107
- /// ```
2108
- pub fn to_string_lossy(self) -> Cow<'static, str> {
2109
- String::from_utf8_lossy(self.as_slice())
2110
- }
2111
- }
2112
-
2113
- impl fmt::Display for FString {
2114
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2115
- write!(f, "{}", unsafe { self.as_r_string().to_s_infallible() })
2116
- }
2117
- }
2118
-
2119
- impl fmt::Debug for FString {
2120
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2121
- write!(f, "{}", self.as_r_string().inspect())
2122
- }
2123
- }
2124
-
2125
- impl IntoValue for FString {
2126
- #[inline]
2127
- fn into_value_with(self, handle: &Ruby) -> Value {
2128
- self.as_r_string().into_value_with(handle)
2129
- }
2130
- }
2131
-
2132
- unsafe impl private::ReprValue for FString {}
2133
-
2134
- impl ReprValue for FString {}
2135
-
2136
1936
  /// An iterator over a Ruby string's codepoints.
2137
1937
  pub struct Codepoints<'a> {
2138
1938
  slice: &'a [u8],
2139
1939
  encoding: RbEncoding,
2140
1940
  }
2141
1941
 
2142
- impl<'a> Iterator for Codepoints<'a> {
1942
+ impl Iterator for Codepoints<'_> {
2143
1943
  type Item = Result<u32, Error>;
2144
1944
 
2145
1945
  fn next(&mut self) -> Option<Self::Item> {
@@ -1,6 +1,8 @@
1
- use std::{fmt, ptr::NonNull};
1
+ use std::fmt;
2
2
 
3
- use rb_sys::{self, rb_check_typeddata, rb_data_typed_object_wrap, ruby_value_type, VALUE};
3
+ use rb_sys::{
4
+ self, rb_check_typeddata, rb_data_typed_object_wrap, ruby_value_type, RTYPEDDATA_P, VALUE,
5
+ };
4
6
 
5
7
  use crate::{
6
8
  class::RClass,
@@ -196,13 +198,8 @@ impl RTypedData {
196
198
  #[inline]
197
199
  pub fn from_value(val: Value) -> Option<Self> {
198
200
  unsafe {
199
- (val.rb_type() == ruby_value_type::RUBY_T_DATA)
200
- .then(|| NonNull::new_unchecked(val.as_rb_value() as *mut rb_sys::RTypedData))
201
- .and_then(|typed_data| {
202
- let typed_flag = typed_data.as_ref().typed_flag;
203
- (typed_flag != 0 && typed_flag <= 3)
204
- .then(|| Self(NonZeroValue::new_unchecked(val)))
205
- })
201
+ (val.rb_type() == ruby_value_type::RUBY_T_DATA && RTYPEDDATA_P(val.as_rb_value()))
202
+ .then(|| Self::from_rb_value_unchecked(val.as_rb_value()))
206
203
  }
207
204
  }
208
205
 
@@ -22,7 +22,7 @@
22
22
  //! # Safety
23
23
  //!
24
24
  //! The unsafe functions in this module are capable of producing values that
25
- //! break the saftey guarantees of almost every other function in Magnus. Use
25
+ //! break the safety guarantees of almost every other function in Magnus. Use
26
26
  //! them with care.
27
27
  use std::panic::UnwindSafe;
28
28
 
@@ -68,7 +68,7 @@ pub trait FromRawValue {
68
68
  ///
69
69
  /// You must only supply a valid [`VALUE`] obtained from [rb-sys](rb_sys)
70
70
  /// to this function. Using a invalid [`Value`] produced from this
71
- /// function will void all saftey guarantees provided by Magnus.
71
+ /// function will void all safety guarantees provided by Magnus.
72
72
  ///
73
73
  /// # Examples
74
74
  ///
@@ -135,7 +135,7 @@ pub trait FromRawId {
135
135
  ///
136
136
  /// You must only supply a valid, non-zero [`ID`] obtained from
137
137
  /// [rb-sys](rb_sys) to this function. Using a invalid [`Id`] produced
138
- /// from this function will void all saftey guarantees provided by
138
+ /// from this function will void all safety guarantees provided by
139
139
  /// Magnus.
140
140
  ///
141
141
  /// # Examples
@@ -169,7 +169,7 @@ impl AsRawId for Id {
169
169
 
170
170
  impl FromRawId for Id {
171
171
  unsafe fn from_raw(id: ID) -> Id {
172
- Id::from_rb_id(id.into())
172
+ Id::from_rb_id(id)
173
173
  }
174
174
  }
175
175
 
@@ -5,7 +5,7 @@
5
5
  //! [`method`](crate::method!) macro, allow defining methods with a fixed
6
6
  //! number of positional arguments, or an unbounded collection of arguments as
7
7
  //! a slice or Ruby array. The functions in this module allow for more complex
8
- //! agument handling.
8
+ //! argument handling.
9
9
  //!
10
10
  //! Ruby arguments can be classified as follows:
11
11
  //! ``` text
@@ -440,7 +440,7 @@ impl<T> ScanArgsBlock for T where T: private::ScanArgsBlock {}
440
440
  /// signatures, including optional arguments and 'splats'.
441
441
  ///
442
442
  /// The format of the arguments required is driven by the types in the return
443
- /// value. The stuct [`Args`] is returned but the types of its fields are
443
+ /// value. The struct [`Args`] is returned but the types of its fields are
444
444
  /// determined by type parameters. The type `()` is used as a placeholder when
445
445
  /// a set of arguments is not required.
446
446
  ///
@@ -645,7 +645,7 @@ pub struct KwArgs<Req, Opt, Splat> {
645
645
  /// Extracts `required` and `optional` arguments from the given `kw` hash.
646
646
  ///
647
647
  /// The format of the arguments required is driven by the types in the return
648
- /// value. The stuct [`KwArgs`] is returned but the types of its fields are
648
+ /// value. The struct [`KwArgs`] is returned but the types of its fields are
649
649
  /// determined by type parameters. The type `()` is used as a placeholder when
650
650
  /// a set of arguments is not required.
651
651
  ///
@@ -1,11 +1,13 @@
1
1
  use std::{fmt, mem::size_of, os::raw::c_void, slice, time::Duration};
2
2
 
3
+ #[allow(deprecated)]
4
+ use rb_sys::rb_thread_fd_close;
3
5
  use rb_sys::{
4
6
  rb_data_typed_object_wrap, rb_thread_alone, rb_thread_check_ints, rb_thread_create,
5
- rb_thread_current, rb_thread_fd_close, rb_thread_fd_writable, rb_thread_interrupted,
6
- rb_thread_kill, rb_thread_local_aref, rb_thread_local_aset, rb_thread_main, rb_thread_run,
7
- rb_thread_schedule, rb_thread_sleep_deadly, rb_thread_sleep_forever, rb_thread_wait_fd,
8
- rb_thread_wait_for, rb_thread_wakeup, rb_thread_wakeup_alive, timeval, VALUE,
7
+ rb_thread_current, rb_thread_fd_writable, rb_thread_interrupted, rb_thread_kill,
8
+ rb_thread_local_aref, rb_thread_local_aset, rb_thread_main, rb_thread_run, rb_thread_schedule,
9
+ rb_thread_sleep_deadly, rb_thread_sleep_forever, rb_thread_wait_fd, rb_thread_wait_for,
10
+ rb_thread_wakeup, rb_thread_wakeup_alive, timeval, VALUE,
9
11
  };
10
12
 
11
13
  use crate::{
@@ -265,13 +267,17 @@ impl Ruby {
265
267
  /// has been closed.
266
268
  ///
267
269
  /// Blocks until all threads waiting on `fd` have woken up.
270
+ #[deprecated(note = "No-op as of Ruby 3.5")]
268
271
  pub fn thread_fd_close<T>(&self, fd: &T) -> Result<(), Error>
269
272
  where
270
273
  T: AsRawFd,
271
274
  {
272
275
  let fd = fd.as_raw_fd();
273
276
  protect(|| {
274
- unsafe { rb_thread_fd_close(fd) };
277
+ unsafe {
278
+ #[allow(deprecated)]
279
+ rb_thread_fd_close(fd)
280
+ };
275
281
  self.qnil()
276
282
  })?;
277
283
  Ok(())
@@ -303,7 +309,7 @@ impl Ruby {
303
309
 
304
310
  /// Blocks for the given period of time.
305
311
  ///
306
- /// Returns an error if sleep is intrrupted by a signal.
312
+ /// Returns an error if sleep is interrupted by a signal.
307
313
  ///
308
314
  /// # Examples
309
315
  ///
@@ -337,7 +343,7 @@ impl Ruby {
337
343
 
338
344
  /// Blocks indefinitely.
339
345
  ///
340
- /// Returns an error if sleep is intrrupted by a signal.
346
+ /// Returns an error if sleep is interrupted by a signal.
341
347
  pub fn thread_sleep_forever(&self) -> Result<(), Error> {
342
348
  protect(|| {
343
349
  unsafe { rb_thread_sleep_forever() };
@@ -352,7 +358,7 @@ impl Ruby {
352
358
  /// deadlock checker is triggered.
353
359
  /// See also [`thread_sleep_forever`](Ruby::thread_sleep_forever).
354
360
  ///
355
- /// Returns an error if sleep is intrrupted by a signal.
361
+ /// Returns an error if sleep is interrupted by a signal.
356
362
  pub fn thread_sleep_deadly(&self) -> Result<(), Error> {
357
363
  protect(|| {
358
364
  unsafe { rb_thread_sleep_deadly() };
@@ -459,7 +465,7 @@ impl Thread {
459
465
  ///
460
466
  /// See also [`Thread::wakeup`] and [`Thread::wakeup_alive`].
461
467
  ///
462
- /// There is not gurantee that `self` will be the next thread scheduled.
468
+ /// There is no guarantee that `self` will be the next thread scheduled.
463
469
  ///
464
470
  /// Returns an error `self` is dead.
465
471
  pub fn run(self) -> Result<(), Error> {
@@ -641,7 +647,7 @@ impl TryConvert for Thread {
641
647
 
642
648
  /// Wrap a closure in a Ruby object with no class.
643
649
  ///
644
- /// This effectivly makes the closure's lifetime managed by Ruby. It will be
650
+ /// This effectively makes the closure's lifetime managed by Ruby. It will be
645
651
  /// dropped when the returned `Value` is garbage collected.
646
652
  fn wrap_closure<F, R>(func: F) -> (*mut Option<F>, Value)
647
653
  where