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
@@ -66,7 +66,7 @@ mod private {
66
66
  }
67
67
  }
68
68
 
69
- seq!(N in 0..=16 {
69
+ seq!(N in 0..=15 {
70
70
  impl_method!(N);
71
71
  });
72
72
 
@@ -222,7 +222,7 @@ mod private {
222
222
  }
223
223
  }
224
224
 
225
- /// Trait implemented for function pointers that can be registed as Ruby
225
+ /// Trait implemented for function pointers that can be registered as Ruby
226
226
  /// methods.
227
227
  ///
228
228
  /// While it is possible to directly write functions that will automatically
@@ -242,9 +242,9 @@ mod private {
242
242
  /// | 1 | `unsafe extern "C" fn(Value, Value) -> Value;` |
243
243
  /// | 2 | `unsafe extern "C" fn(Value, Value, Value) -> Value;` |
244
244
  /// | ... | ... |
245
- /// | 16 | ... |
245
+ /// | 15 | ... |
246
246
  ///
247
- /// note: for arity 0..=16 the number of arguments is 1 greater than the arity,
247
+ /// note: for arity 0..=15 the number of arguments is 1 greater than the arity,
248
248
  /// due to the initial `self` argument.
249
249
  pub trait Method: private::Method {}
250
250
 
@@ -265,7 +265,7 @@ impl<T> Method for T where T: private::Method {}
265
265
  ///
266
266
  /// where `I` implements `Iterator<Item = T>` and `T` implements [`IntoValue`].
267
267
  ///
268
- /// When is `Err(magnus::Error)` returned to Ruby it will be conveted to and
268
+ /// When is `Err(magnus::Error)` returned to Ruby it will be converted to and
269
269
  /// raised as a Ruby exception.
270
270
  ///
271
271
  /// [`Yield`], [`YieldValues`], and [`YieldSplat`] allow returning a Rust
@@ -286,7 +286,7 @@ impl<T> ReturnValue for T where T: private::ReturnValue {}
286
286
  /// * `()`
287
287
  /// * `Result<(), magnus::Error>`
288
288
  ///
289
- /// When is `Err(magnus::Error)` returned to Ruby it will be conveted to and
289
+ /// When is `Err(magnus::Error)` returned to Ruby it will be converted to and
290
290
  /// raised as a Ruby exception.
291
291
  ///
292
292
  /// Note: functions without a specified return value will return `()`. `()`
@@ -304,7 +304,7 @@ impl<T> InitReturn for T where T: private::InitReturn {}
304
304
  ///
305
305
  /// where `T` implements [`IntoValue`].
306
306
  ///
307
- /// When is `Err(magnus::Error)` returned to Ruby it will be conveted to and
307
+ /// When is `Err(magnus::Error)` returned to Ruby it will be converted to and
308
308
  /// raised as a Ruby exception.
309
309
  ///
310
310
  /// Note: functions without a specified return value will return `()`. `()`
@@ -771,7 +771,7 @@ macro_rules! method_n {
771
771
  }
772
772
  }
773
773
 
774
- seq!(N in 0..=16 {
774
+ seq!(N in 0..=15 {
775
775
  method_n!(Method~N, RubyMethod~N, N);
776
776
  });
777
777
 
@@ -783,8 +783,8 @@ seq!(N in 0..=16 {
783
783
  /// [`define_method`](crate::module::Module::define_method).
784
784
  ///
785
785
  /// Ruby code implicitly always has a `self` parameter available. In the
786
- /// extention API this is passed explicitly. As a result there is always an
787
- /// extra `self` argument before the arguments explitly passed in Ruby, and the
786
+ /// extension API this is passed explicitly. As a result there is always an
787
+ /// extra `self` argument before the arguments explicitly passed in Ruby, and the
788
788
  /// number of Rust argument will be one more than the Ruby arity.
789
789
  ///
790
790
  /// The values `-2` and `-1` for `arity` have special meaning. Both indicate
@@ -1257,51 +1257,8 @@ macro_rules! method {
1257
1257
  $crate::Value,
1258
1258
  ) -> $crate::Value
1259
1259
  }};
1260
- ($name:expr, 16) => {{
1261
- unsafe extern "C" fn anon(
1262
- rb_self: $crate::Value,
1263
- a: $crate::Value,
1264
- b: $crate::Value,
1265
- c: $crate::Value,
1266
- d: $crate::Value,
1267
- e: $crate::Value,
1268
- f: $crate::Value,
1269
- g: $crate::Value,
1270
- h: $crate::Value,
1271
- i: $crate::Value,
1272
- j: $crate::Value,
1273
- k: $crate::Value,
1274
- l: $crate::Value,
1275
- m: $crate::Value,
1276
- n: $crate::Value,
1277
- o: $crate::Value,
1278
- p: $crate::Value,
1279
- ) -> $crate::Value {
1280
- use $crate::method::{Method16, RubyMethod16};
1281
- $name.call_handle_error(rb_self, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
1282
- }
1283
- anon as unsafe extern "C" fn(
1284
- $crate::Value,
1285
- $crate::Value,
1286
- $crate::Value,
1287
- $crate::Value,
1288
- $crate::Value,
1289
- $crate::Value,
1290
- $crate::Value,
1291
- $crate::Value,
1292
- $crate::Value,
1293
- $crate::Value,
1294
- $crate::Value,
1295
- $crate::Value,
1296
- $crate::Value,
1297
- $crate::Value,
1298
- $crate::Value,
1299
- $crate::Value,
1300
- $crate::Value,
1301
- ) -> $crate::Value
1302
- }};
1303
1260
  ($name:expr, $arity:expr) => {
1304
- compile_error!("arity must be an integer literal between -2..=16")
1261
+ compile_error!("arity must be an integer literal between -2..=15")
1305
1262
  };
1306
1263
  }
1307
1264
 
@@ -1554,7 +1511,7 @@ macro_rules! function_n {
1554
1511
  }
1555
1512
  }
1556
1513
 
1557
- seq!(N in 0..=16 {
1514
+ seq!(N in 0..=15 {
1558
1515
  function_n!(Function~N, RubyFunction~N, N);
1559
1516
  });
1560
1517
 
@@ -1567,7 +1524,7 @@ seq!(N in 0..=16 {
1567
1524
  /// [`define_method`](crate::module::Module::define_method).
1568
1525
  ///
1569
1526
  /// Ruby code implicitly always has a `self` parameter available. In the
1570
- /// extention API this is passed explicitly. The wrapper this macro generates
1527
+ /// extension API this is passed explicitly. The wrapper this macro generates
1571
1528
  /// ignores that argument, and does not pass it to the wrapped function.
1572
1529
  ///
1573
1530
  /// The values `-2` and `-1` for `arity` have special meaning. Both indicate
@@ -2036,50 +1993,7 @@ macro_rules! function {
2036
1993
  $crate::Value,
2037
1994
  ) -> $crate::Value
2038
1995
  }};
2039
- ($name:expr, 16) => {{
2040
- unsafe extern "C" fn anon(
2041
- rb_self: $crate::Value,
2042
- a: $crate::Value,
2043
- b: $crate::Value,
2044
- c: $crate::Value,
2045
- d: $crate::Value,
2046
- e: $crate::Value,
2047
- f: $crate::Value,
2048
- g: $crate::Value,
2049
- h: $crate::Value,
2050
- i: $crate::Value,
2051
- j: $crate::Value,
2052
- k: $crate::Value,
2053
- l: $crate::Value,
2054
- m: $crate::Value,
2055
- n: $crate::Value,
2056
- o: $crate::Value,
2057
- p: $crate::Value,
2058
- ) -> $crate::Value {
2059
- use $crate::method::{Function16, RubyFunction16};
2060
- $name.call_handle_error(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
2061
- }
2062
- anon as unsafe extern "C" fn(
2063
- $crate::Value,
2064
- $crate::Value,
2065
- $crate::Value,
2066
- $crate::Value,
2067
- $crate::Value,
2068
- $crate::Value,
2069
- $crate::Value,
2070
- $crate::Value,
2071
- $crate::Value,
2072
- $crate::Value,
2073
- $crate::Value,
2074
- $crate::Value,
2075
- $crate::Value,
2076
- $crate::Value,
2077
- $crate::Value,
2078
- $crate::Value,
2079
- $crate::Value,
2080
- ) -> $crate::Value
2081
- }};
2082
1996
  ($name:expr, $arity:expr) => {
2083
- compile_error!("arity must be an integer literal between -2..=16")
1997
+ compile_error!("arity must be an integer literal between -2..=15")
2084
1998
  };
2085
1999
  }
@@ -60,7 +60,7 @@ impl Ruby {
60
60
  ///
61
61
  /// See the [`Module`] trait for defining instance methods and nested
62
62
  /// classes/modules.
63
- /// See the [`Object`] trait for defining singlton methods (aka class methods).
63
+ /// See the [`Object`] trait for defining singleton methods (aka class methods).
64
64
  ///
65
65
  /// See the [`ReprValue`] trait for additional methods available on this type.
66
66
  /// See [`Ruby`](Ruby#rmodule) for methods to create an `RModule`.
@@ -107,7 +107,7 @@ impl Mutex {
107
107
  unsafe { Value::new(rb_mutex_locked_p(self.as_rb_value())).to_bool() }
108
108
  }
109
109
 
110
- /// Attempts to aquire the lock.
110
+ /// Attempts to acquire the lock.
111
111
  ///
112
112
  /// This method does not block. Returns true if the lock can be acquired,
113
113
  /// false otherwise.
@@ -1087,7 +1087,7 @@ impl RArray {
1087
1087
  /// ensure this does not happen.
1088
1088
  ///
1089
1089
  /// Ruby must not be allowed to garbage collect or modify `self` while a
1090
- /// refrence to the slice is held.
1090
+ /// reference to the slice is held.
1091
1091
  ///
1092
1092
  /// # Examples
1093
1093
  ///
@@ -1097,7 +1097,7 @@ impl RArray {
1097
1097
  /// fn example(ruby: &Ruby) -> Result<(), Error> {
1098
1098
  /// let ary: RArray = ruby.eval("[1, 2, 3, 4, 5]")?;
1099
1099
  /// // must not call any Ruby api that may modify ary while we have a
1100
- /// // refrence to the return value of ::from_slice()
1100
+ /// // reference to the return value of ::from_slice()
1101
1101
  /// unsafe {
1102
1102
  /// let middle = ruby.ary_new_from_values(&ary.as_slice()[1..4]);
1103
1103
  /// rb_assert!(ruby, "middle == [2, 3, 4]", middle);
@@ -4,8 +4,8 @@ use std::{
4
4
  };
5
5
 
6
6
  use rb_sys::{
7
- rb_ll2inum, rb_num2ll, rb_num2long, rb_num2ull, rb_num2ulong, rb_ull2inum, ruby_fl_type,
8
- ruby_value_type, VALUE,
7
+ rb_big2str, rb_ll2inum, rb_num2ll, rb_num2long, rb_num2ull, rb_num2ulong, rb_ull2inum,
8
+ ruby_fl_type, ruby_value_type, VALUE,
9
9
  };
10
10
 
11
11
  use crate::{
@@ -18,7 +18,7 @@ use crate::{
18
18
  private::{self, ReprValue as _},
19
19
  Fixnum, NonZeroValue, ReprValue, Value,
20
20
  },
21
- Ruby,
21
+ RString, Ruby,
22
22
  };
23
23
 
24
24
  /// # `RBignum`
@@ -250,6 +250,57 @@ impl RBignum {
250
250
  Ok(res)
251
251
  }
252
252
 
253
+ /// Convert `self` to an `i128`. Returns `Err` if `self` is out of range for
254
+ /// `i128`.
255
+ ///
256
+ /// # Examples
257
+ ///
258
+ /// ```
259
+ /// use magnus::{eval, RBignum};
260
+ /// # let _cleanup = unsafe { magnus::embed::init() };
261
+ ///
262
+ /// assert_eq!(
263
+ /// eval::<RBignum>("170141183460469231731687303715884105727")
264
+ /// .unwrap()
265
+ /// .to_i128()
266
+ /// .unwrap(),
267
+ /// 170141183460469231731687303715884105727
268
+ /// );
269
+ /// assert_eq!(
270
+ /// eval::<RBignum>("-170141183460469231731687303715884105728")
271
+ /// .unwrap()
272
+ /// .to_i128()
273
+ /// .unwrap(),
274
+ /// -170141183460469231731687303715884105728
275
+ /// );
276
+ /// assert!(eval::<RBignum>("170141183460469231731687303715884105728")
277
+ /// .unwrap()
278
+ /// .to_i128()
279
+ /// .is_err());
280
+ /// assert!(eval::<RBignum>("-170141183460469231731687303715884105729")
281
+ /// .unwrap()
282
+ /// .to_i128()
283
+ /// .is_err());
284
+ /// ```
285
+ pub fn to_i128(self) -> Result<i128, Error> {
286
+ debug_assert_value!(self);
287
+ let handle = Ruby::get_with(self);
288
+ let mut res = 0;
289
+ protect(|| {
290
+ unsafe { res = rb_big2str(self.as_rb_value(), 10) };
291
+ handle.qnil()
292
+ })?;
293
+ unsafe { RString::from_rb_value_unchecked(res).as_str() }
294
+ .unwrap()
295
+ .parse::<i128>()
296
+ .map_err(|_| {
297
+ Error::new(
298
+ handle.exception_range_error(),
299
+ "bignum too big to convert into `i128`",
300
+ )
301
+ })
302
+ }
303
+
253
304
  /// Convert `self` to an `isize`. Returns `Err` if `self` is out of range
254
305
  /// for `isize`.
255
306
  ///
@@ -357,6 +408,52 @@ impl RBignum {
357
408
  Ok(res)
358
409
  }
359
410
 
411
+ /// Convert `self` to a `u128`. Returns `Err` if `self` is negative or out
412
+ /// of range for `u128`.
413
+ ///
414
+ /// # Examples
415
+ ///
416
+ /// ```
417
+ /// use magnus::{eval, RBignum};
418
+ /// # let _cleanup = unsafe { magnus::embed::init() };
419
+ ///
420
+ /// assert_eq!(
421
+ /// eval::<RBignum>("340282366920938463463374607431768211455")
422
+ /// .unwrap()
423
+ /// .to_u128()
424
+ /// .unwrap(),
425
+ /// 340282366920938463463374607431768211455
426
+ /// );
427
+ /// assert!(eval::<RBignum>("340282366920938463463374607431768211456")
428
+ /// .unwrap()
429
+ /// .to_u128()
430
+ /// .is_err());
431
+ /// ```
432
+ pub fn to_u128(self) -> Result<u128, Error> {
433
+ debug_assert_value!(self);
434
+ let handle = Ruby::get_with(self);
435
+ if self.is_negative() {
436
+ return Err(Error::new(
437
+ handle.exception_range_error(),
438
+ "can't convert negative integer to unsigned",
439
+ ));
440
+ }
441
+ let mut res = 0;
442
+ protect(|| {
443
+ unsafe { res = rb_big2str(self.as_rb_value(), 10) };
444
+ handle.qnil()
445
+ })?;
446
+ unsafe { RString::from_rb_value_unchecked(res).as_str() }
447
+ .unwrap()
448
+ .parse::<u128>()
449
+ .map_err(|_| {
450
+ Error::new(
451
+ handle.exception_range_error(),
452
+ "bignum too big to convert into `u128`",
453
+ )
454
+ })
455
+ }
456
+
360
457
  /// Convert `self` to a `usize`. Returns `Err` if `self` is negative or out
361
458
  /// of range for `usize`.
362
459
  ///
@@ -1,6 +1,7 @@
1
1
  //! Types and functions for working with Ruby’s Hash class.
2
2
 
3
3
  use std::{
4
+ collections::BTreeMap,
4
5
  collections::HashMap,
5
6
  convert::Infallible,
6
7
  fmt,
@@ -612,7 +613,7 @@ impl RHash {
612
613
  ))
613
614
  })
614
615
  .ok()
615
- .and_then(|v| (!v.is_undef()).then(|| v))
616
+ .and_then(|v| (!v.is_undef()).then_some(v))
616
617
  }
617
618
 
618
619
  /// Return the value for `key`, converting it to `U`.
@@ -804,6 +805,46 @@ impl RHash {
804
805
  Ok(map)
805
806
  }
806
807
 
808
+ /// Return `self` converted to a Rust [`BTreeMap`].
809
+ ///
810
+ /// This will only convert to a map of 'owned' Rust native types. The types
811
+ /// representing Ruby objects can not be stored in a heap-allocated
812
+ /// datastructure like a [`BTreeMap`] as they are hidden from the mark phase
813
+ /// of Ruby's garbage collector, and thus may be prematurely garbage
814
+ /// collected in the following sweep phase.
815
+ ///
816
+ /// Errors if the conversion of any key or value fails.
817
+ ///
818
+ /// # Examples
819
+ ///
820
+ /// ```
821
+ /// use std::collections::BTreeMap;
822
+ ///
823
+ /// use magnus::{Error, RHash, Ruby};
824
+ ///
825
+ /// fn example(ruby: &Ruby) -> Result<(), Error> {
826
+ /// let r_hash: RHash = ruby.eval(r#"{"answer" => 42}"#)?;
827
+ /// let mut hash_map = BTreeMap::new();
828
+ /// hash_map.insert(String::from("answer"), 42);
829
+ /// assert_eq!(r_hash.to_btree_map()?, hash_map);
830
+ ///
831
+ /// Ok(())
832
+ /// }
833
+ /// # Ruby::init(example).unwrap()
834
+ /// ```
835
+ pub fn to_btree_map<K, V>(self) -> Result<BTreeMap<K, V>, Error>
836
+ where
837
+ K: TryConvertOwned + Eq + Hash + Ord,
838
+ V: TryConvertOwned,
839
+ {
840
+ let mut map = BTreeMap::new();
841
+ self.foreach(|key, value| {
842
+ map.insert(key, value);
843
+ Ok(ForEach::Continue)
844
+ })?;
845
+ Ok(map)
846
+ }
847
+
807
848
  /// Convert `self` to a Rust vector of key/value pairs.
808
849
  ///
809
850
  /// This will only convert to a map of 'owned' Rust native types. The types
@@ -940,6 +981,27 @@ where
940
981
  {
941
982
  }
942
983
 
984
+ impl<K, V> IntoValue for BTreeMap<K, V>
985
+ where
986
+ K: IntoValueFromNative,
987
+ V: IntoValueFromNative,
988
+ {
989
+ fn into_value_with(self, handle: &Ruby) -> Value {
990
+ let hash = handle.hash_new();
991
+ for (k, v) in self {
992
+ let _ = hash.aset(k, v);
993
+ }
994
+ hash.into_value_with(handle)
995
+ }
996
+ }
997
+
998
+ unsafe impl<K, V> IntoValueFromNative for BTreeMap<K, V>
999
+ where
1000
+ K: IntoValueFromNative,
1001
+ V: IntoValueFromNative,
1002
+ {
1003
+ }
1004
+
943
1005
  #[cfg(feature = "old-api")]
944
1006
  impl<K, V> FromIterator<(K, V)> for RHash
945
1007
  where