talon_one 5.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (974) hide show
  1. checksums.yaml +4 -4
  2. data/.github/.example/.bundle/config +2 -0
  3. data/.github/.example/Gemfile +6 -0
  4. data/.github/.example/Gemfile.lock +47 -0
  5. data/.github/.example/example.rb +85 -0
  6. data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/gem.build_complete +0 -0
  7. data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/gem_make.out +24 -0
  8. data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/json/ext/generator.bundle +0 -0
  9. data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/json/ext/parser.bundle +0 -0
  10. data/.github/.example/vendor/bundle/ruby/3.3.0/extensions/arm64-darwin-24/3.3.0/json-2.8.2/mkmf.log +177 -0
  11. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/.github/workflows/ruby.yml +41 -0
  12. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/.gitignore +8 -0
  13. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/.rspec +3 -0
  14. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
  15. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/Gemfile +43 -0
  16. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/Guardfile +10 -0
  17. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/LICENSE +20 -0
  18. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/README.md +118 -0
  19. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/Rakefile +40 -0
  20. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/ethon.gemspec +26 -0
  21. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curl.rb +90 -0
  22. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/classes.rb +65 -0
  23. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/codes.rb +122 -0
  24. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/constants.rb +80 -0
  25. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/form_options.rb +37 -0
  26. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/functions.rb +58 -0
  27. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/infos.rb +151 -0
  28. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/messages.rb +19 -0
  29. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/options.rb +503 -0
  30. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/curls/settings.rb +12 -0
  31. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/callbacks.rb +149 -0
  32. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/debug_info.rb +47 -0
  33. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/features.rb +31 -0
  34. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/form.rb +107 -0
  35. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/header.rb +61 -0
  36. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/actionable.rb +157 -0
  37. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/custom.rb +29 -0
  38. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/delete.rb +25 -0
  39. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/get.rb +24 -0
  40. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/head.rb +24 -0
  41. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/options.rb +24 -0
  42. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/patch.rb +24 -0
  43. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/post.rb +26 -0
  44. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/postable.rb +32 -0
  45. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/put.rb +27 -0
  46. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http/putable.rb +25 -0
  47. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/http.rb +68 -0
  48. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/informations.rb +116 -0
  49. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/mirror.rb +36 -0
  50. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/operations.rb +64 -0
  51. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/options.rb +50 -0
  52. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/params.rb +29 -0
  53. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/queryable.rb +154 -0
  54. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/response_callbacks.rb +136 -0
  55. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy/util.rb +28 -0
  56. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/easy.rb +315 -0
  57. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/ethon_error.rb +9 -0
  58. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/global_init.rb +13 -0
  59. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_option.rb +13 -0
  60. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/invalid_value.rb +13 -0
  61. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_add.rb +12 -0
  62. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_fdset.rb +12 -0
  63. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_remove.rb +12 -0
  64. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/multi_timeout.rb +13 -0
  65. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors/select.rb +13 -0
  66. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/errors.rb +17 -0
  67. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/libc.rb +21 -0
  68. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/loggable.rb +59 -0
  69. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi/operations.rb +228 -0
  70. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi/options.rb +117 -0
  71. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi/stack.rb +49 -0
  72. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/multi.rb +126 -0
  73. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon/version.rb +6 -0
  74. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/lib/ethon.rb +36 -0
  75. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/benchmarks.rb +104 -0
  76. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/memory_leaks.rb +114 -0
  77. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/perf_spec_helper.rb +37 -0
  78. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/support/memory_test_helpers.rb +76 -0
  79. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/support/os_memory_leak_tracker.rb +48 -0
  80. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/profile/support/ruby_object_leak_tracker.rb +49 -0
  81. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/curl_spec.rb +38 -0
  82. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/callbacks_spec.rb +81 -0
  83. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/debug_info_spec.rb +54 -0
  84. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/features_spec.rb +24 -0
  85. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/form_spec.rb +104 -0
  86. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/header_spec.rb +79 -0
  87. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/custom_spec.rb +177 -0
  88. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/delete_spec.rb +21 -0
  89. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/get_spec.rb +126 -0
  90. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/head_spec.rb +80 -0
  91. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/options_spec.rb +51 -0
  92. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/patch_spec.rb +51 -0
  93. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/post_spec.rb +317 -0
  94. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http/put_spec.rb +168 -0
  95. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/http_spec.rb +64 -0
  96. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/informations_spec.rb +126 -0
  97. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/mirror_spec.rb +47 -0
  98. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/operations_spec.rb +271 -0
  99. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/options_spec.rb +193 -0
  100. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/queryable_spec.rb +235 -0
  101. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/response_callbacks_spec.rb +152 -0
  102. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy/util_spec.rb +28 -0
  103. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/easy_spec.rb +203 -0
  104. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/libc_spec.rb +14 -0
  105. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/loggable_spec.rb +22 -0
  106. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi/operations_spec.rb +298 -0
  107. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi/options_spec.rb +182 -0
  108. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi/stack_spec.rb +80 -0
  109. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/ethon/multi_spec.rb +152 -0
  110. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/spec_helper.rb +28 -0
  111. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/support/localhost_server.rb +95 -0
  112. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ethon-0.16.0/spec/support/server.rb +115 -0
  113. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/CHANGELOG.md +456 -0
  114. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/COPYING +49 -0
  115. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/Gemfile +21 -0
  116. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/LICENSE +24 -0
  117. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/LICENSE.SPECS +22 -0
  118. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/README.md +137 -0
  119. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/Rakefile +206 -0
  120. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/ffi.gemspec +42 -0
  121. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/2.5/ffi_c.bundle +0 -0
  122. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle +0 -0
  123. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/2.7/ffi_c.bundle +0 -0
  124. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.0/ffi_c.bundle +0 -0
  125. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.1/ffi_c.bundle +0 -0
  126. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.2/ffi_c.bundle +0 -0
  127. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/3.3/ffi_c.bundle +0 -0
  128. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/abstract_memory.rb +44 -0
  129. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/autopointer.rb +180 -0
  130. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/buffer.rb +4 -0
  131. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/callback.rb +4 -0
  132. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/compat.rb +43 -0
  133. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/data_converter.rb +67 -0
  134. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/dynamic_library.rb +118 -0
  135. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/enum.rb +302 -0
  136. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/errno.rb +43 -0
  137. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/ffi.rb +50 -0
  138. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/function.rb +71 -0
  139. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/io.rb +62 -0
  140. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/library.rb +576 -0
  141. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/library_path.rb +109 -0
  142. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/managedstruct.rb +84 -0
  143. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/memorypointer.rb +1 -0
  144. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  145. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
  146. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
  147. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-linux/types.conf +175 -0
  148. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  149. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/aarch64-windows/types.conf +52 -0
  150. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/arm-freebsd/types.conf +152 -0
  151. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
  152. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/arm-linux/types.conf +132 -0
  153. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
  154. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
  155. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-cygwin/types.conf +3 -0
  156. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-darwin/types.conf +100 -0
  157. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-freebsd/types.conf +152 -0
  158. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
  159. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-gnu/types.conf +107 -0
  160. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-linux/types.conf +103 -0
  161. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-netbsd/types.conf +126 -0
  162. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-openbsd/types.conf +128 -0
  163. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-solaris/types.conf +122 -0
  164. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/i386-windows/types.conf +52 -0
  165. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/ia64-linux/types.conf +104 -0
  166. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
  167. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mips-linux/types.conf +102 -0
  168. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mips64-linux/types.conf +104 -0
  169. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mips64el-linux/types.conf +104 -0
  170. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsel-linux/types.conf +102 -0
  171. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
  172. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
  173. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
  174. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
  175. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-aix/types.conf +180 -0
  176. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
  177. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-linux/types.conf +130 -0
  178. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  179. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
  180. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  181. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  182. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/s390-linux/types.conf +102 -0
  183. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/s390x-linux/types.conf +102 -0
  184. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparc-linux/types.conf +102 -0
  185. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparc-solaris/types.conf +128 -0
  186. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparcv9-linux/types.conf +102 -0
  187. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  188. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
  189. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/sw_64-linux/types.conf +141 -0
  190. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
  191. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-darwin/types.conf +130 -0
  192. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  193. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
  194. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
  195. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  196. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-linux/types.conf +132 -0
  197. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  198. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
  199. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-openbsd/types.conf +134 -0
  200. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
  201. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform/x86_64-windows/types.conf +52 -0
  202. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/platform.rb +187 -0
  203. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/pointer.rb +167 -0
  204. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct.rb +317 -0
  205. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct_by_reference.rb +72 -0
  206. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct_layout.rb +96 -0
  207. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/struct_layout_builder.rb +227 -0
  208. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/const_generator.rb +232 -0
  209. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/generator.rb +105 -0
  210. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/generator_task.rb +32 -0
  211. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/struct_generator.rb +195 -0
  212. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/tools/types_generator.rb +137 -0
  213. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/types.rb +222 -0
  214. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/union.rb +43 -0
  215. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/variadic.rb +80 -0
  216. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi/version.rb +3 -0
  217. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb +27 -0
  218. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/rakelib/ffi_gem_helper.rb +65 -0
  219. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/getlogin.rb +8 -0
  220. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/getpid.rb +8 -0
  221. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/gettimeofday.rb +18 -0
  222. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/hello.rb +8 -0
  223. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/hello_ractor.rb +11 -0
  224. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/inotify.rb +60 -0
  225. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/pty.rb +75 -0
  226. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/qsort.rb +20 -0
  227. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/samples/qsort_ractor.rb +28 -0
  228. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/abstract_memory.rbs +165 -0
  229. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/auto_pointer.rbs +27 -0
  230. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/buffer.rbs +18 -0
  231. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/data_converter.rbs +10 -0
  232. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/dynamic_library.rbs +9 -0
  233. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/enum.rbs +38 -0
  234. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/function.rbs +39 -0
  235. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/library.rbs +42 -0
  236. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/native_type.rbs +86 -0
  237. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/pointer.rbs +42 -0
  238. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct.rbs +76 -0
  239. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_by_reference.rbs +11 -0
  240. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_by_value.rbs +7 -0
  241. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_layout.rbs +9 -0
  242. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/struct_layout_builder.rbs +5 -0
  243. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi/type.rbs +39 -0
  244. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/ffi-1.17.0-arm64-darwin/sig/ffi.rbs +26 -0
  245. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/BSDL +22 -0
  246. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/CHANGES.md +559 -0
  247. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/COPYING +56 -0
  248. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/LEGAL +60 -0
  249. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/README.md +195 -0
  250. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/fbuffer/fbuffer.h +184 -0
  251. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/generator/Makefile +270 -0
  252. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/generator/extconf.rb +10 -0
  253. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/generator/generator.c +1663 -0
  254. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/Makefile +270 -0
  255. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/extconf.rb +12 -0
  256. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/parser.c +3238 -0
  257. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/ext/json/ext/parser/parser.rl +1465 -0
  258. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/json.gemspec +64 -0
  259. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/bigdecimal.rb +58 -0
  260. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/complex.rb +51 -0
  261. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/core.rb +12 -0
  262. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/date.rb +54 -0
  263. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/date_time.rb +67 -0
  264. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/exception.rb +49 -0
  265. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/ostruct.rb +54 -0
  266. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/range.rb +54 -0
  267. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/rational.rb +49 -0
  268. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/regexp.rb +48 -0
  269. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/set.rb +48 -0
  270. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/struct.rb +52 -0
  271. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/symbol.rb +47 -0
  272. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/add/time.rb +52 -0
  273. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/common.rb +876 -0
  274. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext/generator/state.rb +105 -0
  275. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext/generator.bundle +0 -0
  276. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext/parser.bundle +0 -0
  277. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/ext.rb +23 -0
  278. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/generic_object.rb +75 -0
  279. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/truffle_ruby/generator.rb +621 -0
  280. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json/version.rb +5 -0
  281. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/json-2.8.2/lib/json.rb +587 -0
  282. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/ci.yml +30 -0
  283. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.github/workflows/experimental.yml +33 -0
  284. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.gitignore +8 -0
  285. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/.rspec +4 -0
  286. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/CHANGELOG.md +410 -0
  287. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/CONTRIBUTING.md +20 -0
  288. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Gemfile +36 -0
  289. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Guardfile +9 -0
  290. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/LICENSE +22 -0
  291. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/README.md +588 -0
  292. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/Rakefile +38 -0
  293. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/UPGRADE.md +55 -0
  294. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/rack/typhoeus/middleware/params_decoder/helper.rb +76 -0
  295. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/rack/typhoeus/middleware/params_decoder.rb +57 -0
  296. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/rack/typhoeus.rb +1 -0
  297. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/adapters/faraday.rb +180 -0
  298. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/cache/dalli.rb +28 -0
  299. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/cache/rails.rb +28 -0
  300. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/cache/redis.rb +35 -0
  301. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/config.rb +85 -0
  302. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/easy_factory.rb +206 -0
  303. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/errors/no_stub.rb +12 -0
  304. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/errors/typhoeus_error.rb +8 -0
  305. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/errors.rb +9 -0
  306. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/expectation.rb +217 -0
  307. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/addable.rb +23 -0
  308. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/before.rb +31 -0
  309. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/block_connection.rb +35 -0
  310. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/cacheable.rb +15 -0
  311. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/memoizable.rb +56 -0
  312. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/queueable.rb +83 -0
  313. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/runnable.rb +19 -0
  314. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra/stubbable.rb +28 -0
  315. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/hydra.rb +95 -0
  316. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/pool.rb +70 -0
  317. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/railtie.rb +12 -0
  318. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/actions.rb +125 -0
  319. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/before.rb +30 -0
  320. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/block_connection.rb +52 -0
  321. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/cacheable.rb +38 -0
  322. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/callbacks.rb +151 -0
  323. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/marshal.rb +22 -0
  324. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/memoizable.rb +38 -0
  325. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/operations.rb +40 -0
  326. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/responseable.rb +29 -0
  327. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/streamable.rb +34 -0
  328. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request/stubbable.rb +30 -0
  329. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/request.rb +223 -0
  330. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/cacheable.rb +14 -0
  331. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/header.rb +105 -0
  332. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/informations.rb +305 -0
  333. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response/status.rb +106 -0
  334. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/response.rb +68 -0
  335. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus/version.rb +5 -0
  336. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/lib/typhoeus.rb +143 -0
  337. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/profile.rb +14 -0
  338. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/perf/vs_nethttp.rb +64 -0
  339. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder/helper_spec.rb +156 -0
  340. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/rack/typhoeus/middleware/params_decoder_spec.rb +31 -0
  341. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/spec_helper.rb +29 -0
  342. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/localhost_server.rb +94 -0
  343. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/memory_cache.rb +15 -0
  344. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/support/server.rb +116 -0
  345. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/adapters/faraday_spec.rb +339 -0
  346. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/dalli_spec.rb +41 -0
  347. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/cache/redis_spec.rb +41 -0
  348. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/config_spec.rb +15 -0
  349. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/easy_factory_spec.rb +143 -0
  350. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/errors/no_stub_spec.rb +13 -0
  351. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/expectation_spec.rb +280 -0
  352. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/addable_spec.rb +22 -0
  353. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/before_spec.rb +98 -0
  354. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/block_connection_spec.rb +18 -0
  355. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/cacheable_spec.rb +88 -0
  356. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/memoizable_spec.rb +53 -0
  357. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/queueable_spec.rb +98 -0
  358. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/runnable_spec.rb +137 -0
  359. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra/stubbable_spec.rb +48 -0
  360. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/hydra_spec.rb +22 -0
  361. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/pool_spec.rb +137 -0
  362. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/actions_spec.rb +19 -0
  363. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/before_spec.rb +93 -0
  364. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/block_connection_spec.rb +75 -0
  365. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/cacheable_spec.rb +94 -0
  366. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/callbacks_spec.rb +91 -0
  367. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/marshal_spec.rb +60 -0
  368. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/memoizable_spec.rb +34 -0
  369. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/operations_spec.rb +101 -0
  370. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/responseable_spec.rb +13 -0
  371. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request/stubbable_spec.rb +45 -0
  372. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/request_spec.rb +256 -0
  373. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/header_spec.rb +147 -0
  374. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/informations_spec.rb +323 -0
  375. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response/status_spec.rb +256 -0
  376. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus/response_spec.rb +100 -0
  377. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/spec/typhoeus_spec.rb +105 -0
  378. data/.github/.example/vendor/bundle/ruby/3.3.0/gems/typhoeus-1.4.1/typhoeus.gemspec +25 -0
  379. data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/ethon-0.16.0.gemspec +24 -0
  380. data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/ffi-1.17.0-arm64-darwin.gemspec +31 -0
  381. data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/json-2.8.2.gemspec +0 -0
  382. data/.github/.example/vendor/bundle/ruby/3.3.0/specifications/typhoeus-1.4.1.gemspec +24 -0
  383. data/.github/dependabot.yml +10 -0
  384. data/.github/workflows/test.yml +75 -0
  385. data/README.md +565 -521
  386. data/docker-compose.yml +47 -0
  387. data/docs/AccountAnalytics.md +1 -1
  388. data/docs/Achievement.md +8 -0
  389. data/docs/AchievementProgress.md +2 -0
  390. data/docs/AdditionalCampaignProperties.md +4 -2
  391. data/docs/AnalyticsDataPoint.md +19 -0
  392. data/docs/AnalyticsDataPointWithTrend.md +19 -0
  393. data/docs/AnalyticsDataPointWithTrendAndInfluencedRate.md +21 -0
  394. data/docs/AnalyticsDataPointWithTrendAndUplift.md +21 -0
  395. data/docs/AnalyticsProduct.md +23 -0
  396. data/docs/AnalyticsProductSKU.md +21 -0
  397. data/docs/Application.md +4 -0
  398. data/docs/ApplicationAnalyticsDataPoint.md +6 -6
  399. data/docs/ApplicationCIF.md +33 -0
  400. data/docs/ApplicationCIFExpression.md +27 -0
  401. data/docs/ApplicationCampaignAnalytics.md +13 -19
  402. data/docs/ApplicationCampaignStats.md +3 -3
  403. data/docs/ApplicationCustomer.md +8 -8
  404. data/docs/ApplicationSession.md +2 -2
  405. data/docs/AsyncCouponDeletionJobResponse.md +17 -0
  406. data/docs/AudienceCustomer.md +2 -2
  407. data/docs/BaseLoyaltyProgram.md +10 -4
  408. data/docs/BaseNotification.md +1 -1
  409. data/docs/BaseNotificationEntity.md +1 -1
  410. data/docs/BulkOperationOnCampaigns.md +3 -1
  411. data/docs/Campaign.md +18 -2
  412. data/docs/CampaignCollectionEditedNotification.md +21 -0
  413. data/docs/CampaignNotificationPolicy.md +3 -1
  414. data/docs/CampaignStateChangedNotification.md +2 -2
  415. data/docs/CampaignStoreBudget.md +25 -0
  416. data/docs/CampaignTemplate.md +3 -1
  417. data/docs/CampaignTemplateCouponReservationSettings.md +19 -0
  418. data/docs/CampaignVersions.md +29 -0
  419. data/docs/CardAddedDeductedPointsNotificationPolicy.md +19 -0
  420. data/docs/CartItem.md +1 -1
  421. data/docs/Change.md +1 -1
  422. data/docs/CodeGeneratorSettings.md +1 -1
  423. data/docs/Coupon.md +1 -1
  424. data/docs/CouponConstraints.md +1 -1
  425. data/docs/CouponCreationJob.md +1 -1
  426. data/docs/CouponDeletionFilters.md +43 -0
  427. data/docs/CouponDeletionJob.md +39 -0
  428. data/docs/CreateAchievement.md +9 -1
  429. data/docs/CustomerProfile.md +2 -2
  430. data/docs/CustomerProfileAudienceRequestItem.md +1 -1
  431. data/docs/CustomerSession.md +1 -1
  432. data/docs/CustomerSessionV2.md +10 -8
  433. data/docs/Effect.md +8 -0
  434. data/docs/EffectEntity.md +9 -1
  435. data/docs/Environment.md +3 -1
  436. data/docs/Event.md +1 -1
  437. data/docs/FeatureFlag.md +1 -1
  438. data/docs/GenerateCampaignDescription.md +19 -0
  439. data/docs/GenerateCampaignTags.md +17 -0
  440. data/docs/GenerateItemFilterDescription.md +17 -0
  441. data/docs/GenerateLoyaltyCard.md +21 -0
  442. data/docs/GenerateRuleTitle.md +19 -0
  443. data/docs/GenerateRuleTitleRule.md +19 -0
  444. data/docs/IncreaseAchievementProgressEffectProps.md +1 -1
  445. data/docs/InlineResponse20020.md +1 -1
  446. data/docs/InlineResponse20021.md +4 -2
  447. data/docs/InlineResponse20022.md +3 -3
  448. data/docs/InlineResponse20023.md +1 -1
  449. data/docs/InlineResponse20024.md +1 -3
  450. data/docs/InlineResponse20025.md +1 -1
  451. data/docs/InlineResponse20026.md +2 -2
  452. data/docs/InlineResponse20027.md +2 -2
  453. data/docs/InlineResponse20028.md +3 -3
  454. data/docs/InlineResponse20029.md +5 -3
  455. data/docs/InlineResponse20030.md +1 -3
  456. data/docs/InlineResponse20031.md +1 -1
  457. data/docs/InlineResponse20032.md +3 -1
  458. data/docs/InlineResponse20033.md +3 -5
  459. data/docs/InlineResponse20034.md +5 -3
  460. data/docs/InlineResponse20035.md +3 -5
  461. data/docs/InlineResponse20036.md +1 -1
  462. data/docs/InlineResponse20037.md +1 -1
  463. data/docs/InlineResponse20038.md +1 -1
  464. data/docs/InlineResponse20039.md +1 -1
  465. data/docs/InlineResponse20040.md +1 -1
  466. data/docs/InlineResponse20041.md +4 -2
  467. data/docs/InlineResponse20042.md +2 -4
  468. data/docs/InlineResponse20043.md +1 -1
  469. data/docs/InlineResponse20044.md +5 -3
  470. data/docs/InlineResponse20045.md +1 -3
  471. data/docs/InlineResponse20046.md +3 -3
  472. data/docs/IntegrationApi.md +73 -12
  473. data/docs/IntegrationCoupon.md +1 -1
  474. data/docs/IntegrationCustomerSessionResponse.md +1 -1
  475. data/docs/InventoryCoupon.md +1 -1
  476. data/docs/InventoryReferral.md +1 -1
  477. data/docs/LedgerInfo.md +2 -2
  478. data/docs/ListCampaignStoreBudgets.md +23 -0
  479. data/docs/ListCampaignStoreBudgetsStore.md +21 -0
  480. data/docs/LoyaltyBalanceWithTier.md +31 -0
  481. data/docs/LoyaltyBalancesWithTiers.md +19 -0
  482. data/docs/LoyaltyCard.md +10 -2
  483. data/docs/LoyaltyCardBatch.md +23 -0
  484. data/docs/LoyaltyCardBatchResponse.md +19 -0
  485. data/docs/LoyaltyLedger.md +1 -1
  486. data/docs/LoyaltyMembership.md +1 -1
  487. data/docs/LoyaltyProgram.md +19 -9
  488. data/docs/LoyaltyProgramBalance.md +2 -2
  489. data/docs/LoyaltyProgramEntity.md +5 -1
  490. data/docs/LoyaltyTier.md +6 -2
  491. data/docs/ManagementApi.md +1159 -258
  492. data/docs/MessageLogEntry.md +10 -2
  493. data/docs/MessageLogResponse.md +3 -3
  494. data/docs/NewAppWideCouponDeletionJob.md +19 -0
  495. data/docs/NewApplication.md +3 -1
  496. data/docs/NewApplicationCIF.md +27 -0
  497. data/docs/NewApplicationCIFExpression.md +21 -0
  498. data/docs/NewBaseNotification.md +1 -1
  499. data/docs/NewCampaignStoreBudget.md +21 -0
  500. data/docs/NewCampaignStoreBudgetStoreLimit.md +19 -0
  501. data/docs/NewCampaignTemplate.md +2 -0
  502. data/docs/NewCouponCreationJob.md +1 -1
  503. data/docs/NewCouponDeletionJob.md +17 -0
  504. data/docs/NewCoupons.md +1 -1
  505. data/docs/NewCouponsForMultipleRecipients.md +1 -1
  506. data/docs/NewCustomerSessionV2.md +4 -4
  507. data/docs/NewLoyaltyProgram.md +10 -4
  508. data/docs/NewLoyaltyTier.md +2 -2
  509. data/docs/NewOutgoingIntegrationWebhook.md +2 -0
  510. data/docs/NewPicklist.md +1 -1
  511. data/docs/NewReferral.md +1 -1
  512. data/docs/NewReferralsForMultipleAdvocates.md +1 -1
  513. data/docs/NewRevisionVersion.md +37 -0
  514. data/docs/NewWebhook.md +3 -1
  515. data/docs/OktaEvent.md +19 -0
  516. data/docs/OktaEventPayload.md +17 -0
  517. data/docs/OktaEventPayloadData.md +17 -0
  518. data/docs/OktaEventTarget.md +21 -0
  519. data/docs/Picklist.md +1 -1
  520. data/docs/Product.md +1 -1
  521. data/docs/ProductSearchMatch.md +21 -0
  522. data/docs/ProductSkuUnitAnalytics.md +23 -0
  523. data/docs/ProductUnitAnalytics.md +25 -0
  524. data/docs/ProjectedTier.md +21 -0
  525. data/docs/Referral.md +1 -1
  526. data/docs/ReferralConstraints.md +1 -1
  527. data/docs/RejectCouponEffectProps.md +3 -1
  528. data/docs/RejectReferralEffectProps.md +3 -1
  529. data/docs/Revision.md +35 -0
  530. data/docs/RevisionActivation.md +17 -0
  531. data/docs/RevisionVersion.md +53 -0
  532. data/docs/RollbackIncreasedAchievementProgressEffectProps.md +27 -0
  533. data/docs/RuleFailureReason.md +5 -1
  534. data/docs/SSOConfig.md +3 -1
  535. data/docs/ScimBaseUser.md +23 -0
  536. data/docs/ScimBaseUserName.md +17 -0
  537. data/docs/ScimNewUser.md +23 -0
  538. data/docs/ScimPatchOperation.md +21 -0
  539. data/docs/ScimPatchRequest.md +19 -0
  540. data/docs/ScimResource.md +21 -0
  541. data/docs/ScimResourceTypesListResponse.md +17 -0
  542. data/docs/ScimSchemaResource.md +23 -0
  543. data/docs/ScimSchemasListResponse.md +21 -0
  544. data/docs/ScimServiceProviderConfigResponse.md +29 -0
  545. data/docs/ScimServiceProviderConfigResponseBulk.md +21 -0
  546. data/docs/ScimServiceProviderConfigResponseChangePassword.md +17 -0
  547. data/docs/ScimServiceProviderConfigResponseFilter.md +19 -0
  548. data/docs/ScimServiceProviderConfigResponsePatch.md +17 -0
  549. data/docs/ScimServiceProviderConfigResponseSort.md +17 -0
  550. data/docs/ScimUser.md +25 -0
  551. data/docs/ScimUsersListResponse.md +21 -0
  552. data/docs/Store.md +2 -2
  553. data/docs/StrikethroughDebugResponse.md +19 -0
  554. data/docs/SummaryCampaignStoreBudget.md +21 -0
  555. data/docs/TemplateArgDef.md +2 -0
  556. data/docs/Tier.md +3 -1
  557. data/docs/TransferLoyaltyCard.md +3 -1
  558. data/docs/UpdateAchievement.md +9 -1
  559. data/docs/UpdateApplication.md +5 -1
  560. data/docs/UpdateApplicationCIF.md +23 -0
  561. data/docs/UpdateCampaign.md +1 -1
  562. data/docs/UpdateCampaignTemplate.md +2 -0
  563. data/docs/UpdateCoupon.md +1 -1
  564. data/docs/UpdateCouponBatch.md +1 -1
  565. data/docs/UpdateLoyaltyCard.md +4 -2
  566. data/docs/UpdateLoyaltyProgram.md +10 -4
  567. data/docs/UpdateLoyaltyProgramTier.md +21 -0
  568. data/docs/UpdatePicklist.md +1 -1
  569. data/docs/UpdateReferral.md +1 -1
  570. data/docs/UpdateReferralBatch.md +1 -1
  571. data/docs/User.md +4 -2
  572. data/docs/ValueMap.md +23 -0
  573. data/docs/Webhook.md +3 -1
  574. data/docs/WebhookLogEntry.md +1 -1
  575. data/docs/WebhookWithOutgoingIntegrationDetails.md +3 -1
  576. data/lib/talon_one/api/integration_api.rb +94 -18
  577. data/lib/talon_one/api/management_api.rb +1347 -387
  578. data/lib/talon_one/models/account.rb +0 -1
  579. data/lib/talon_one/models/account_additional_cost.rb +0 -1
  580. data/lib/talon_one/models/achievement.rb +87 -2
  581. data/lib/talon_one/models/achievement_progress.rb +16 -1
  582. data/lib/talon_one/models/add_loyalty_points_effect_props.rb +11 -0
  583. data/lib/talon_one/models/additional_campaign_properties.rb +22 -7
  584. data/lib/talon_one/models/analytics_data_point.rb +225 -0
  585. data/lib/talon_one/models/analytics_data_point_with_trend.rb +225 -0
  586. data/lib/talon_one/models/analytics_data_point_with_trend_and_influenced_rate.rb +239 -0
  587. data/lib/talon_one/models/analytics_data_point_with_trend_and_uplift.rb +239 -0
  588. data/lib/talon_one/models/analytics_product.rb +252 -0
  589. data/lib/talon_one/models/analytics_product_sku.rb +242 -0
  590. data/lib/talon_one/models/application.rb +21 -2
  591. data/lib/talon_one/models/application_analytics_data_point.rb +14 -4
  592. data/lib/talon_one/models/application_api_key.rb +0 -1
  593. data/lib/talon_one/models/application_campaign_analytics.rb +39 -41
  594. data/lib/talon_one/models/application_campaign_stats.rb +16 -16
  595. data/lib/talon_one/models/application_cif.rb +307 -0
  596. data/lib/talon_one/models/application_cif_expression.rb +274 -0
  597. data/lib/talon_one/models/application_customer.rb +4 -5
  598. data/lib/talon_one/models/application_event.rb +0 -1
  599. data/lib/talon_one/models/application_referee.rb +0 -1
  600. data/lib/talon_one/models/application_session.rb +1 -2
  601. data/lib/talon_one/models/async_coupon_deletion_job_response.rb +212 -0
  602. data/lib/talon_one/models/attribute.rb +2 -3
  603. data/lib/talon_one/models/audience.rb +0 -1
  604. data/lib/talon_one/models/audience_customer.rb +1 -2
  605. data/lib/talon_one/models/base_loyalty_program.rb +62 -21
  606. data/lib/talon_one/models/base_notification.rb +3 -3
  607. data/lib/talon_one/models/base_notification_entity.rb +1 -0
  608. data/lib/talon_one/models/base_notification_webhook.rb +0 -1
  609. data/lib/talon_one/models/bulk_operation_on_campaigns.rb +16 -6
  610. data/lib/talon_one/models/campaign.rb +106 -8
  611. data/lib/talon_one/models/campaign_analytics.rb +0 -1
  612. data/lib/talon_one/models/campaign_collection.rb +0 -1
  613. data/lib/talon_one/models/campaign_collection_edited_notification.rb +235 -0
  614. data/lib/talon_one/models/campaign_collection_without_payload.rb +0 -1
  615. data/lib/talon_one/models/campaign_evaluation_group.rb +0 -1
  616. data/lib/talon_one/models/campaign_group.rb +0 -1
  617. data/lib/talon_one/models/campaign_notification_policy.rb +16 -4
  618. data/lib/talon_one/models/campaign_set.rb +0 -1
  619. data/lib/talon_one/models/campaign_state_changed_notification.rb +2 -2
  620. data/lib/talon_one/models/campaign_store_budget.rb +274 -0
  621. data/lib/talon_one/models/campaign_template.rb +10 -2
  622. data/lib/talon_one/models/campaign_template_coupon_reservation_settings.rb +243 -0
  623. data/lib/talon_one/models/campaign_versions.rb +303 -0
  624. data/lib/talon_one/models/card_added_deducted_points_notification_policy.rb +269 -0
  625. data/lib/talon_one/models/card_ledger_transaction_log_entry.rb +11 -0
  626. data/lib/talon_one/models/card_ledger_transaction_log_entry_integration_api.rb +11 -0
  627. data/lib/talon_one/models/cart_item.rb +1 -1
  628. data/lib/talon_one/models/catalog.rb +0 -1
  629. data/lib/talon_one/models/catalog_item.rb +0 -1
  630. data/lib/talon_one/models/change.rb +0 -1
  631. data/lib/talon_one/models/code_generator_settings.rb +12 -1
  632. data/lib/talon_one/models/collection.rb +0 -1
  633. data/lib/talon_one/models/collection_item.rb +0 -1
  634. data/lib/talon_one/models/collection_without_payload.rb +0 -1
  635. data/lib/talon_one/models/coupon.rb +1 -2
  636. data/lib/talon_one/models/coupon_constraints.rb +1 -1
  637. data/lib/talon_one/models/coupon_creation_job.rb +1 -2
  638. data/lib/talon_one/models/coupon_deletion_filters.rb +373 -0
  639. data/lib/talon_one/models/coupon_deletion_job.rb +369 -0
  640. data/lib/talon_one/models/create_achievement.rb +90 -4
  641. data/lib/talon_one/models/custom_effect.rb +0 -1
  642. data/lib/talon_one/models/customer_profile.rb +1 -2
  643. data/lib/talon_one/models/customer_profile_audience_request_item.rb +1 -1
  644. data/lib/talon_one/models/customer_profile_integration_request_v2.rb +1 -1
  645. data/lib/talon_one/models/customer_session.rb +0 -1
  646. data/lib/talon_one/models/customer_session_v2.rb +20 -10
  647. data/lib/talon_one/models/deactivate_user_request.rb +0 -1
  648. data/lib/talon_one/models/deduct_loyalty_points_effect_props.rb +11 -0
  649. data/lib/talon_one/models/effect.rb +42 -2
  650. data/lib/talon_one/models/effect_entity.rb +44 -4
  651. data/lib/talon_one/models/environment.rb +16 -5
  652. data/lib/talon_one/models/event.rb +0 -6
  653. data/lib/talon_one/models/event_type.rb +0 -1
  654. data/lib/talon_one/models/event_v2.rb +0 -1
  655. data/lib/talon_one/models/export.rb +0 -1
  656. data/lib/talon_one/models/features_feed.rb +0 -1
  657. data/lib/talon_one/models/generate_campaign_description.rb +227 -0
  658. data/lib/talon_one/models/generate_campaign_tags.rb +212 -0
  659. data/lib/talon_one/models/generate_item_filter_description.rb +214 -0
  660. data/lib/talon_one/models/generate_loyalty_card.rb +292 -0
  661. data/lib/talon_one/models/generate_rule_title.rb +226 -0
  662. data/lib/talon_one/models/generate_rule_title_rule.rb +221 -0
  663. data/lib/talon_one/models/giveaway.rb +0 -1
  664. data/lib/talon_one/models/import.rb +0 -1
  665. data/lib/talon_one/models/increase_achievement_progress_effect_props.rb +1 -1
  666. data/lib/talon_one/models/inline_response20020.rb +1 -1
  667. data/lib/talon_one/models/inline_response20021.rb +11 -7
  668. data/lib/talon_one/models/inline_response20022.rb +10 -10
  669. data/lib/talon_one/models/inline_response20023.rb +1 -1
  670. data/lib/talon_one/models/inline_response20024.rb +6 -10
  671. data/lib/talon_one/models/inline_response20025.rb +1 -1
  672. data/lib/talon_one/models/inline_response20026.rb +1 -6
  673. data/lib/talon_one/models/inline_response20027.rb +6 -1
  674. data/lib/talon_one/models/inline_response20028.rb +11 -11
  675. data/lib/talon_one/models/inline_response20029.rb +11 -7
  676. data/lib/talon_one/models/inline_response20030.rb +2 -11
  677. data/lib/talon_one/models/inline_response20031.rb +1 -1
  678. data/lib/talon_one/models/inline_response20032.rb +11 -2
  679. data/lib/talon_one/models/inline_response20033.rb +7 -11
  680. data/lib/talon_one/models/inline_response20034.rb +11 -7
  681. data/lib/talon_one/models/inline_response20035.rb +7 -11
  682. data/lib/talon_one/models/inline_response20036.rb +1 -1
  683. data/lib/talon_one/models/inline_response20037.rb +1 -1
  684. data/lib/talon_one/models/inline_response20038.rb +1 -1
  685. data/lib/talon_one/models/inline_response20039.rb +1 -1
  686. data/lib/talon_one/models/inline_response20040.rb +1 -1
  687. data/lib/talon_one/models/inline_response20041.rb +11 -7
  688. data/lib/talon_one/models/inline_response20042.rb +7 -11
  689. data/lib/talon_one/models/inline_response20043.rb +1 -1
  690. data/lib/talon_one/models/inline_response20044.rb +11 -7
  691. data/lib/talon_one/models/inline_response20045.rb +2 -11
  692. data/lib/talon_one/models/inline_response20046.rb +6 -1
  693. data/lib/talon_one/models/integration_coupon.rb +1 -2
  694. data/lib/talon_one/models/integration_customer_session_response.rb +1 -0
  695. data/lib/talon_one/models/integration_event.rb +0 -1
  696. data/lib/talon_one/models/integration_event_v2_request.rb +0 -1
  697. data/lib/talon_one/models/inventory_coupon.rb +1 -2
  698. data/lib/talon_one/models/inventory_referral.rb +1 -2
  699. data/lib/talon_one/models/item_attribute.rb +0 -1
  700. data/lib/talon_one/models/ledger_entry.rb +1 -1
  701. data/lib/talon_one/models/ledger_info.rb +3 -3
  702. data/lib/talon_one/models/library_attribute.rb +0 -1
  703. data/lib/talon_one/models/limit_counter.rb +0 -1
  704. data/lib/talon_one/models/list_campaign_store_budgets.rb +248 -0
  705. data/lib/talon_one/models/list_campaign_store_budgets_store.rb +239 -0
  706. data/lib/talon_one/models/login_params.rb +0 -1
  707. data/lib/talon_one/models/loyalty_balance_with_tier.rb +276 -0
  708. data/lib/talon_one/models/loyalty_balances_with_tiers.rb +219 -0
  709. data/lib/talon_one/models/loyalty_card.rb +78 -6
  710. data/lib/talon_one/models/loyalty_card_balances.rb +1 -1
  711. data/lib/talon_one/models/loyalty_card_batch.rb +312 -0
  712. data/lib/talon_one/models/loyalty_card_batch_response.rb +227 -0
  713. data/lib/talon_one/models/loyalty_program.rb +90 -27
  714. data/lib/talon_one/models/loyalty_program_balance.rb +2 -2
  715. data/lib/talon_one/models/loyalty_program_entity.rb +24 -4
  716. data/lib/talon_one/models/loyalty_program_transaction.rb +11 -0
  717. data/lib/talon_one/models/loyalty_tier.rb +24 -4
  718. data/lib/talon_one/models/management_key.rb +0 -1
  719. data/lib/talon_one/models/message_log_entry.rb +67 -7
  720. data/lib/talon_one/models/message_log_response.rb +3 -22
  721. data/lib/talon_one/models/model_return.rb +0 -1
  722. data/lib/talon_one/models/multiple_audiences_item.rb +0 -1
  723. data/lib/talon_one/models/multiple_customer_profile_integration_request_item.rb +1 -1
  724. data/lib/talon_one/models/new_account_sign_up.rb +0 -1
  725. data/lib/talon_one/models/new_additional_cost.rb +0 -1
  726. data/lib/talon_one/models/new_app_wide_coupon_deletion_job.rb +227 -0
  727. data/lib/talon_one/models/new_application.rb +14 -4
  728. data/lib/talon_one/models/new_application_api_key.rb +0 -1
  729. data/lib/talon_one/models/new_application_cif.rb +262 -0
  730. data/lib/talon_one/models/new_application_cif_expression.rb +229 -0
  731. data/lib/talon_one/models/new_attribute.rb +2 -3
  732. data/lib/talon_one/models/new_audience.rb +0 -1
  733. data/lib/talon_one/models/new_base_notification.rb +1 -1
  734. data/lib/talon_one/models/new_campaign.rb +0 -1
  735. data/lib/talon_one/models/new_campaign_collection.rb +0 -1
  736. data/lib/talon_one/models/new_campaign_set.rb +0 -1
  737. data/lib/talon_one/models/new_campaign_store_budget.rb +283 -0
  738. data/lib/talon_one/models/new_campaign_store_budget_store_limit.rb +227 -0
  739. data/lib/talon_one/models/new_campaign_template.rb +10 -1
  740. data/lib/talon_one/models/new_catalog.rb +0 -1
  741. data/lib/talon_one/models/new_collection.rb +0 -1
  742. data/lib/talon_one/models/new_coupon_creation_job.rb +1 -2
  743. data/lib/talon_one/models/new_coupon_deletion_job.rb +211 -0
  744. data/lib/talon_one/models/new_coupons.rb +1 -2
  745. data/lib/talon_one/models/new_coupons_for_multiple_recipients.rb +1 -2
  746. data/lib/talon_one/models/new_custom_effect.rb +0 -1
  747. data/lib/talon_one/models/new_customer_session.rb +0 -1
  748. data/lib/talon_one/models/new_customer_session_v2.rb +3 -3
  749. data/lib/talon_one/models/new_event.rb +0 -1
  750. data/lib/talon_one/models/new_event_type.rb +0 -1
  751. data/lib/talon_one/models/new_loyalty_program.rb +63 -22
  752. data/lib/talon_one/models/new_loyalty_tier.rb +2 -2
  753. data/lib/talon_one/models/new_management_key.rb +0 -1
  754. data/lib/talon_one/models/new_multiple_audiences_item.rb +0 -1
  755. data/lib/talon_one/models/new_notification_test.rb +2 -2
  756. data/lib/talon_one/models/new_outgoing_integration_webhook.rb +11 -1
  757. data/lib/talon_one/models/new_referral.rb +1 -2
  758. data/lib/talon_one/models/new_referrals_for_multiple_advocates.rb +1 -2
  759. data/lib/talon_one/models/new_revision_version.rb +352 -0
  760. data/lib/talon_one/models/new_role.rb +0 -1
  761. data/lib/talon_one/models/new_role_v2.rb +0 -1
  762. data/lib/talon_one/models/new_saml_connection.rb +1 -1
  763. data/lib/talon_one/models/new_store.rb +0 -1
  764. data/lib/talon_one/models/new_user.rb +0 -1
  765. data/lib/talon_one/models/new_webhook.rb +12 -3
  766. data/lib/talon_one/models/okta_event.rb +229 -0
  767. data/lib/talon_one/models/okta_event_payload.rb +212 -0
  768. data/lib/talon_one/models/okta_event_payload_data.rb +214 -0
  769. data/lib/talon_one/models/okta_event_target.rb +243 -0
  770. data/lib/talon_one/models/outgoing_integration_template_with_configuration_details.rb +0 -1
  771. data/lib/talon_one/models/picklist.rb +0 -1
  772. data/lib/talon_one/models/product.rb +1 -1
  773. data/lib/talon_one/models/product_search_match.rb +237 -0
  774. data/lib/talon_one/models/product_sku_unit_analytics.rb +256 -0
  775. data/lib/talon_one/models/product_unit_analytics.rb +271 -0
  776. data/lib/talon_one/models/projected_tier.rb +232 -0
  777. data/lib/talon_one/models/referral.rb +1 -2
  778. data/lib/talon_one/models/referral_constraints.rb +1 -1
  779. data/lib/talon_one/models/reject_coupon_effect_props.rb +14 -4
  780. data/lib/talon_one/models/reject_referral_effect_props.rb +14 -4
  781. data/lib/talon_one/models/revision.rb +318 -0
  782. data/lib/talon_one/models/revision_activation.rb +206 -0
  783. data/lib/talon_one/models/revision_version.rb +465 -0
  784. data/lib/talon_one/models/role.rb +0 -1
  785. data/lib/talon_one/models/role_assign.rb +0 -1
  786. data/lib/talon_one/models/role_v2.rb +0 -1
  787. data/lib/talon_one/models/rollback_added_loyalty_points_effect_props.rb +11 -0
  788. data/lib/talon_one/models/rollback_deducted_loyalty_points_effect_props.rb +11 -0
  789. data/lib/talon_one/models/rollback_increased_achievement_progress_effect_props.rb +288 -0
  790. data/lib/talon_one/models/rule_failure_reason.rb +24 -4
  791. data/lib/talon_one/models/ruleset.rb +0 -1
  792. data/lib/talon_one/models/saml_connection.rb +1 -1
  793. data/lib/talon_one/models/scim_base_user.rb +237 -0
  794. data/lib/talon_one/models/scim_base_user_name.rb +208 -0
  795. data/lib/talon_one/models/scim_new_user.rb +242 -0
  796. data/lib/talon_one/models/scim_patch_operation.rb +267 -0
  797. data/lib/talon_one/models/scim_patch_request.rb +226 -0
  798. data/lib/talon_one/models/scim_resource.rb +228 -0
  799. data/lib/talon_one/models/scim_resource_types_list_response.rb +214 -0
  800. data/lib/talon_one/models/scim_schema_resource.rb +239 -0
  801. data/lib/talon_one/models/scim_schemas_list_response.rb +236 -0
  802. data/lib/talon_one/models/scim_service_provider_config_response.rb +265 -0
  803. data/lib/talon_one/models/scim_service_provider_config_response_bulk.rb +228 -0
  804. data/lib/talon_one/models/scim_service_provider_config_response_change_password.rb +208 -0
  805. data/lib/talon_one/models/scim_service_provider_config_response_filter.rb +218 -0
  806. data/lib/talon_one/models/scim_service_provider_config_response_patch.rb +208 -0
  807. data/lib/talon_one/models/scim_service_provider_config_response_sort.rb +208 -0
  808. data/lib/talon_one/models/scim_user.rb +257 -0
  809. data/lib/talon_one/models/scim_users_list_response.rb +236 -0
  810. data/lib/talon_one/models/sso_config.rb +14 -4
  811. data/lib/talon_one/models/store.rb +1 -2
  812. data/lib/talon_one/models/strikethrough_debug_response.rb +221 -0
  813. data/lib/talon_one/models/summary_campaign_store_budget.rb +280 -0
  814. data/lib/talon_one/models/talang_attribute.rb +0 -1
  815. data/lib/talon_one/models/template_arg_def.rb +11 -2
  816. data/lib/talon_one/models/template_def.rb +0 -1
  817. data/lib/talon_one/models/template_limit_config.rb +0 -1
  818. data/lib/talon_one/models/tier.rb +12 -2
  819. data/lib/talon_one/models/transfer_loyalty_card.rb +25 -4
  820. data/lib/talon_one/models/update_achievement.rb +90 -4
  821. data/lib/talon_one/models/update_application.rb +24 -4
  822. data/lib/talon_one/models/update_application_cif.rb +237 -0
  823. data/lib/talon_one/models/update_campaign.rb +1 -1
  824. data/lib/talon_one/models/update_campaign_evaluation_group.rb +0 -1
  825. data/lib/talon_one/models/update_campaign_group.rb +0 -1
  826. data/lib/talon_one/models/update_campaign_template.rb +10 -1
  827. data/lib/talon_one/models/update_coupon.rb +1 -2
  828. data/lib/talon_one/models/update_coupon_batch.rb +1 -2
  829. data/lib/talon_one/models/update_loyalty_card.rb +15 -5
  830. data/lib/talon_one/models/update_loyalty_program.rb +63 -22
  831. data/lib/talon_one/models/update_loyalty_program_tier.rb +257 -0
  832. data/lib/talon_one/models/update_picklist.rb +0 -1
  833. data/lib/talon_one/models/update_referral.rb +1 -1
  834. data/lib/talon_one/models/update_referral_batch.rb +1 -1
  835. data/lib/talon_one/models/user.rb +14 -5
  836. data/lib/talon_one/models/value_map.rb +245 -0
  837. data/lib/talon_one/models/webhook.rb +12 -3
  838. data/lib/talon_one/models/webhook_log_entry.rb +1 -1
  839. data/lib/talon_one/models/webhook_with_outgoing_integration_details.rb +12 -3
  840. data/lib/talon_one/version.rb +1 -1
  841. data/lib/talon_one.rb +69 -15
  842. data/spec/api/integration_api_spec.rb +22 -7
  843. data/spec/api/management_api_spec.rb +284 -98
  844. data/spec/models/achievement_progress_spec.rb +6 -0
  845. data/spec/models/achievement_spec.rb +32 -0
  846. data/spec/models/additional_campaign_properties_spec.rb +7 -1
  847. data/spec/models/analytics_data_point_spec.rb +47 -0
  848. data/spec/models/analytics_data_point_with_trend_and_influenced_rate_spec.rb +53 -0
  849. data/spec/models/analytics_data_point_with_trend_and_uplift_spec.rb +53 -0
  850. data/spec/models/analytics_data_point_with_trend_spec.rb +47 -0
  851. data/spec/models/analytics_product_sku_spec.rb +53 -0
  852. data/spec/models/analytics_product_spec.rb +59 -0
  853. data/spec/models/application_campaign_analytics_spec.rb +1 -19
  854. data/spec/models/application_campaign_stats_spec.rb +2 -2
  855. data/spec/models/application_cif_expression_spec.rb +71 -0
  856. data/spec/models/application_cif_spec.rb +89 -0
  857. data/spec/models/application_spec.rb +12 -0
  858. data/spec/models/async_coupon_deletion_job_response_spec.rb +41 -0
  859. data/spec/models/attribute_spec.rb +1 -1
  860. data/spec/models/base_loyalty_program_spec.rb +26 -4
  861. data/spec/models/base_notification_spec.rb +1 -1
  862. data/spec/models/bulk_operation_on_campaigns_spec.rb +7 -1
  863. data/spec/models/campaign_collection_edited_notification_spec.rb +53 -0
  864. data/spec/models/campaign_notification_policy_spec.rb +6 -0
  865. data/spec/models/campaign_spec.rb +53 -1
  866. data/spec/models/campaign_store_budget_spec.rb +65 -0
  867. data/spec/models/campaign_template_coupon_reservation_settings_spec.rb +47 -0
  868. data/spec/models/campaign_template_spec.rb +6 -0
  869. data/spec/models/campaign_versions_spec.rb +81 -0
  870. data/spec/models/card_added_deducted_points_notification_policy_spec.rb +51 -0
  871. data/spec/models/coupon_deletion_filters_spec.rb +123 -0
  872. data/spec/models/coupon_deletion_job_spec.rb +107 -0
  873. data/spec/models/create_achievement_spec.rb +32 -0
  874. data/spec/models/customer_session_v2_spec.rb +6 -0
  875. data/spec/models/effect_entity_spec.rb +24 -0
  876. data/spec/models/effect_spec.rb +24 -0
  877. data/spec/models/environment_spec.rb +6 -0
  878. data/spec/models/generate_campaign_description_spec.rb +47 -0
  879. data/spec/models/generate_campaign_tags_spec.rb +41 -0
  880. data/spec/models/generate_item_filter_description_spec.rb +41 -0
  881. data/spec/models/generate_loyalty_card_spec.rb +57 -0
  882. data/spec/models/generate_rule_title_rule_spec.rb +47 -0
  883. data/spec/models/generate_rule_title_spec.rb +47 -0
  884. data/spec/models/inline_response20021_spec.rb +6 -0
  885. data/spec/models/inline_response20022_spec.rb +2 -2
  886. data/spec/models/inline_response20024_spec.rb +0 -6
  887. data/spec/models/inline_response20028_spec.rb +1 -1
  888. data/spec/models/inline_response20029_spec.rb +6 -0
  889. data/spec/models/inline_response20030_spec.rb +0 -6
  890. data/spec/models/inline_response20032_spec.rb +6 -0
  891. data/spec/models/inline_response20033_spec.rb +0 -6
  892. data/spec/models/inline_response20034_spec.rb +6 -0
  893. data/spec/models/inline_response20035_spec.rb +0 -6
  894. data/spec/models/inline_response20041_spec.rb +6 -0
  895. data/spec/models/inline_response20042_spec.rb +0 -6
  896. data/spec/models/inline_response20044_spec.rb +6 -0
  897. data/spec/models/inline_response20045_spec.rb +0 -6
  898. data/spec/models/limit_config_spec.rb +1 -1
  899. data/spec/models/list_campaign_store_budgets_spec.rb +59 -0
  900. data/spec/models/list_campaign_store_budgets_store_spec.rb +53 -0
  901. data/spec/models/loyalty_balance_with_tier_spec.rb +83 -0
  902. data/spec/models/loyalty_balances_with_tiers_spec.rb +47 -0
  903. data/spec/models/loyalty_card_batch_response_spec.rb +47 -0
  904. data/spec/models/loyalty_card_batch_spec.rb +63 -0
  905. data/spec/models/loyalty_card_spec.rb +24 -0
  906. data/spec/models/loyalty_program_entity_spec.rb +12 -0
  907. data/spec/models/loyalty_program_spec.rb +38 -4
  908. data/spec/models/loyalty_tier_spec.rb +12 -0
  909. data/spec/models/message_log_entry_spec.rb +25 -1
  910. data/spec/models/new_app_wide_coupon_deletion_job_spec.rb +47 -0
  911. data/spec/models/new_application_cif_expression_spec.rb +53 -0
  912. data/spec/models/new_application_cif_spec.rb +71 -0
  913. data/spec/models/new_application_spec.rb +6 -0
  914. data/spec/models/new_attribute_spec.rb +1 -1
  915. data/spec/models/new_campaign_store_budget_spec.rb +61 -0
  916. data/spec/models/new_campaign_store_budget_store_limit_spec.rb +47 -0
  917. data/spec/models/new_campaign_template_spec.rb +6 -0
  918. data/spec/models/new_coupon_deletion_job_spec.rb +41 -0
  919. data/spec/models/new_loyalty_program_spec.rb +26 -4
  920. data/spec/models/new_notification_test_spec.rb +1 -1
  921. data/spec/models/new_outgoing_integration_webhook_spec.rb +6 -0
  922. data/spec/models/new_revision_version_spec.rb +105 -0
  923. data/spec/models/new_webhook_spec.rb +6 -0
  924. data/spec/models/okta_event_payload_data_spec.rb +41 -0
  925. data/spec/models/okta_event_payload_spec.rb +41 -0
  926. data/spec/models/okta_event_spec.rb +47 -0
  927. data/spec/models/okta_event_target_spec.rb +53 -0
  928. data/spec/models/product_search_match_spec.rb +53 -0
  929. data/spec/models/product_sku_unit_analytics_spec.rb +59 -0
  930. data/spec/models/product_unit_analytics_spec.rb +65 -0
  931. data/spec/models/projected_tier_spec.rb +53 -0
  932. data/spec/models/reject_coupon_effect_props_spec.rb +6 -0
  933. data/spec/models/reject_referral_effect_props_spec.rb +6 -0
  934. data/spec/models/revision_activation_spec.rb +41 -0
  935. data/spec/models/revision_spec.rb +95 -0
  936. data/spec/models/revision_version_spec.rb +153 -0
  937. data/spec/models/rollback_increased_achievement_progress_effect_props_spec.rb +71 -0
  938. data/spec/models/rule_failure_reason_spec.rb +12 -0
  939. data/spec/models/scim_base_user_name_spec.rb +41 -0
  940. data/spec/models/scim_base_user_spec.rb +59 -0
  941. data/spec/models/scim_new_user_spec.rb +59 -0
  942. data/spec/models/scim_patch_operation_spec.rb +57 -0
  943. data/spec/models/scim_patch_request_spec.rb +47 -0
  944. data/spec/models/scim_resource_spec.rb +53 -0
  945. data/spec/models/scim_resource_types_list_response_spec.rb +41 -0
  946. data/spec/models/scim_schema_resource_spec.rb +59 -0
  947. data/spec/models/scim_schemas_list_response_spec.rb +53 -0
  948. data/spec/models/scim_service_provider_config_response_bulk_spec.rb +53 -0
  949. data/spec/models/scim_service_provider_config_response_change_password_spec.rb +41 -0
  950. data/spec/models/scim_service_provider_config_response_filter_spec.rb +47 -0
  951. data/spec/models/scim_service_provider_config_response_patch_spec.rb +41 -0
  952. data/spec/models/scim_service_provider_config_response_sort_spec.rb +41 -0
  953. data/spec/models/scim_service_provider_config_response_spec.rb +77 -0
  954. data/spec/models/scim_user_spec.rb +65 -0
  955. data/spec/models/scim_users_list_response_spec.rb +53 -0
  956. data/spec/models/sso_config_spec.rb +6 -0
  957. data/spec/models/strikethrough_debug_response_spec.rb +47 -0
  958. data/spec/models/summary_campaign_store_budget_spec.rb +61 -0
  959. data/spec/models/template_arg_def_spec.rb +6 -0
  960. data/spec/models/template_limit_config_spec.rb +1 -1
  961. data/spec/models/tier_spec.rb +6 -0
  962. data/spec/models/transfer_loyalty_card_spec.rb +6 -0
  963. data/spec/models/update_achievement_spec.rb +32 -0
  964. data/spec/models/update_application_cif_spec.rb +59 -0
  965. data/spec/models/update_application_spec.rb +12 -0
  966. data/spec/models/update_campaign_template_spec.rb +6 -0
  967. data/spec/models/update_loyalty_card_spec.rb +6 -0
  968. data/spec/models/update_loyalty_program_spec.rb +26 -4
  969. data/spec/models/update_loyalty_program_tier_spec.rb +53 -0
  970. data/spec/models/user_spec.rb +6 -0
  971. data/spec/models/value_map_spec.rb +59 -0
  972. data/spec/models/webhook_spec.rb +6 -0
  973. data/spec/models/webhook_with_outgoing_integration_details_spec.rb +6 -0
  974. metadata +663 -6
@@ -0,0 +1,3238 @@
1
+ /* This file is automatically generated from parser.rl by using ragel */
2
+ #line 1 "parser.rl"
3
+ #include "ruby.h"
4
+ #include "../fbuffer/fbuffer.h"
5
+
6
+ static VALUE mJSON, mExt, cParser, eNestingError, Encoding_UTF_8;
7
+ static VALUE CNaN, CInfinity, CMinusInfinity;
8
+
9
+ static ID i_json_creatable_p, i_json_create, i_create_id,
10
+ i_chr, i_deep_const_get, i_match, i_aset, i_aref,
11
+ i_leftshift, i_new, i_try_convert, i_uminus, i_encode;
12
+
13
+ static VALUE sym_max_nesting, sym_allow_nan, sym_allow_trailing_comma, sym_symbolize_names, sym_freeze,
14
+ sym_create_additions, sym_create_id, sym_object_class, sym_array_class,
15
+ sym_decimal_class, sym_match_string;
16
+
17
+ static int binary_encindex;
18
+ static int utf8_encindex;
19
+
20
+ #ifdef HAVE_RB_CATEGORY_WARN
21
+ # define json_deprecated(message) rb_category_warn(RB_WARN_CATEGORY_DEPRECATED, message)
22
+ #else
23
+ # define json_deprecated(message) rb_warn(message)
24
+ #endif
25
+
26
+ static const char deprecated_create_additions_warning[] =
27
+ "JSON.load implicit support for `create_additions: true` is deprecated "
28
+ "and will be removed in 3.0, use JSON.unsafe_load or explicitly "
29
+ "pass `create_additions: true`";
30
+
31
+ #ifndef HAVE_RB_GC_MARK_LOCATIONS
32
+ // For TruffleRuby
33
+ void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
34
+ {
35
+ VALUE *value = start;
36
+
37
+ while (value < end) {
38
+ rb_gc_mark(*value);
39
+ value++;
40
+ }
41
+ }
42
+ #endif
43
+
44
+ #ifndef HAVE_RB_HASH_BULK_INSERT
45
+ // For TruffleRuby
46
+ void rb_hash_bulk_insert(long count, const VALUE *pairs, VALUE hash)
47
+ {
48
+ long index = 0;
49
+ while (index < count) {
50
+ VALUE name = pairs[index++];
51
+ VALUE value = pairs[index++];
52
+ rb_hash_aset(hash, name, value);
53
+ }
54
+ RB_GC_GUARD(hash);
55
+ }
56
+ #endif
57
+
58
+ /* name cache */
59
+
60
+ #include <string.h>
61
+ #include <ctype.h>
62
+
63
+ // Object names are likely to be repeated, and are frozen.
64
+ // As such we can re-use them if we keep a cache of the ones we've seen so far,
65
+ // and save much more expensive lookups into the global fstring table.
66
+ // This cache implementation is deliberately simple, as we're optimizing for compactness,
67
+ // to be able to fit safely on the stack.
68
+ // As such, binary search into a sorted array gives a good tradeoff between compactness and
69
+ // performance.
70
+ #define JSON_RVALUE_CACHE_CAPA 63
71
+ typedef struct rvalue_cache_struct {
72
+ int length;
73
+ VALUE entries[JSON_RVALUE_CACHE_CAPA];
74
+ } rvalue_cache;
75
+
76
+ static rb_encoding *enc_utf8;
77
+
78
+ #define JSON_RVALUE_CACHE_MAX_ENTRY_LENGTH 55
79
+
80
+ static inline VALUE build_interned_string(const char *str, const long length)
81
+ {
82
+ # ifdef HAVE_RB_ENC_INTERNED_STR
83
+ return rb_enc_interned_str(str, length, enc_utf8);
84
+ # else
85
+ VALUE rstring = rb_utf8_str_new(str, length);
86
+ return rb_funcall(rb_str_freeze(rstring), i_uminus, 0);
87
+ # endif
88
+ }
89
+
90
+ static inline VALUE build_symbol(const char *str, const long length)
91
+ {
92
+ return rb_str_intern(build_interned_string(str, length));
93
+ }
94
+
95
+ static void rvalue_cache_insert_at(rvalue_cache *cache, int index, VALUE rstring)
96
+ {
97
+ MEMMOVE(&cache->entries[index + 1], &cache->entries[index], VALUE, cache->length - index);
98
+ cache->length++;
99
+ cache->entries[index] = rstring;
100
+ }
101
+
102
+ static inline int rstring_cache_cmp(const char *str, const long length, VALUE rstring)
103
+ {
104
+ long rstring_length = RSTRING_LEN(rstring);
105
+ if (length == rstring_length) {
106
+ return memcmp(str, RSTRING_PTR(rstring), length);
107
+ } else {
108
+ return (int)(length - rstring_length);
109
+ }
110
+ }
111
+
112
+ static VALUE rstring_cache_fetch(rvalue_cache *cache, const char *str, const long length)
113
+ {
114
+ if (RB_UNLIKELY(length > JSON_RVALUE_CACHE_MAX_ENTRY_LENGTH)) {
115
+ // Common names aren't likely to be very long. So we just don't
116
+ // cache names above an arbitrary threshold.
117
+ return Qfalse;
118
+ }
119
+
120
+ if (RB_UNLIKELY(!isalpha(str[0]))) {
121
+ // Simple heuristic, if the first character isn't a letter,
122
+ // we're much less likely to see this string again.
123
+ // We mostly want to cache strings that are likely to be repeated.
124
+ return Qfalse;
125
+ }
126
+
127
+ int low = 0;
128
+ int high = cache->length - 1;
129
+ int mid = 0;
130
+ int last_cmp = 0;
131
+
132
+ while (low <= high) {
133
+ mid = (high + low) >> 1;
134
+ VALUE entry = cache->entries[mid];
135
+ last_cmp = rstring_cache_cmp(str, length, entry);
136
+
137
+ if (last_cmp == 0) {
138
+ return entry;
139
+ } else if (last_cmp > 0) {
140
+ low = mid + 1;
141
+ } else {
142
+ high = mid - 1;
143
+ }
144
+ }
145
+
146
+ if (RB_UNLIKELY(memchr(str, '\\', length))) {
147
+ // We assume the overwhelming majority of names don't need to be escaped.
148
+ // But if they do, we have to fallback to the slow path.
149
+ return Qfalse;
150
+ }
151
+
152
+ VALUE rstring = build_interned_string(str, length);
153
+
154
+ if (cache->length < JSON_RVALUE_CACHE_CAPA) {
155
+ if (last_cmp > 0) {
156
+ mid += 1;
157
+ }
158
+
159
+ rvalue_cache_insert_at(cache, mid, rstring);
160
+ }
161
+ return rstring;
162
+ }
163
+
164
+ static VALUE rsymbol_cache_fetch(rvalue_cache *cache, const char *str, const long length)
165
+ {
166
+ if (RB_UNLIKELY(length > JSON_RVALUE_CACHE_MAX_ENTRY_LENGTH)) {
167
+ // Common names aren't likely to be very long. So we just don't
168
+ // cache names above an arbitrary threshold.
169
+ return Qfalse;
170
+ }
171
+
172
+ if (RB_UNLIKELY(!isalpha(str[0]))) {
173
+ // Simple heuristic, if the first character isn't a letter,
174
+ // we're much less likely to see this string again.
175
+ // We mostly want to cache strings that are likely to be repeated.
176
+ return Qfalse;
177
+ }
178
+
179
+ int low = 0;
180
+ int high = cache->length - 1;
181
+ int mid = 0;
182
+ int last_cmp = 0;
183
+
184
+ while (low <= high) {
185
+ mid = (high + low) >> 1;
186
+ VALUE entry = cache->entries[mid];
187
+ last_cmp = rstring_cache_cmp(str, length, rb_sym2str(entry));
188
+
189
+ if (last_cmp == 0) {
190
+ return entry;
191
+ } else if (last_cmp > 0) {
192
+ low = mid + 1;
193
+ } else {
194
+ high = mid - 1;
195
+ }
196
+ }
197
+
198
+ if (RB_UNLIKELY(memchr(str, '\\', length))) {
199
+ // We assume the overwhelming majority of names don't need to be escaped.
200
+ // But if they do, we have to fallback to the slow path.
201
+ return Qfalse;
202
+ }
203
+
204
+ VALUE rsymbol = build_symbol(str, length);
205
+
206
+ if (cache->length < JSON_RVALUE_CACHE_CAPA) {
207
+ if (last_cmp > 0) {
208
+ mid += 1;
209
+ }
210
+
211
+ rvalue_cache_insert_at(cache, mid, rsymbol);
212
+ }
213
+ return rsymbol;
214
+ }
215
+
216
+ /* rvalue stack */
217
+
218
+ #define RVALUE_STACK_INITIAL_CAPA 128
219
+
220
+ enum rvalue_stack_type {
221
+ RVALUE_STACK_HEAP_ALLOCATED = 0,
222
+ RVALUE_STACK_STACK_ALLOCATED = 1,
223
+ };
224
+
225
+ typedef struct rvalue_stack_struct {
226
+ enum rvalue_stack_type type;
227
+ long capa;
228
+ long head;
229
+ VALUE *ptr;
230
+ } rvalue_stack;
231
+
232
+ static rvalue_stack *rvalue_stack_spill(rvalue_stack *old_stack, VALUE *handle, rvalue_stack **stack_ref);
233
+
234
+ static rvalue_stack *rvalue_stack_grow(rvalue_stack *stack, VALUE *handle, rvalue_stack **stack_ref)
235
+ {
236
+ long required = stack->capa * 2;
237
+
238
+ if (stack->type == RVALUE_STACK_STACK_ALLOCATED) {
239
+ stack = rvalue_stack_spill(stack, handle, stack_ref);
240
+ } else {
241
+ REALLOC_N(stack->ptr, VALUE, required);
242
+ stack->capa = required;
243
+ }
244
+ return stack;
245
+ }
246
+
247
+ static void rvalue_stack_push(rvalue_stack *stack, VALUE value, VALUE *handle, rvalue_stack **stack_ref)
248
+ {
249
+ if (RB_UNLIKELY(stack->head >= stack->capa)) {
250
+ stack = rvalue_stack_grow(stack, handle, stack_ref);
251
+ }
252
+ stack->ptr[stack->head] = value;
253
+ stack->head++;
254
+ }
255
+
256
+ static inline VALUE *rvalue_stack_peek(rvalue_stack *stack, long count)
257
+ {
258
+ return stack->ptr + (stack->head - count);
259
+ }
260
+
261
+ static inline void rvalue_stack_pop(rvalue_stack *stack, long count)
262
+ {
263
+ stack->head -= count;
264
+ }
265
+
266
+ static void rvalue_stack_mark(void *ptr)
267
+ {
268
+ rvalue_stack *stack = (rvalue_stack *)ptr;
269
+ rb_gc_mark_locations(stack->ptr, stack->ptr + stack->head);
270
+ }
271
+
272
+ static void rvalue_stack_free(void *ptr)
273
+ {
274
+ rvalue_stack *stack = (rvalue_stack *)ptr;
275
+ if (stack) {
276
+ ruby_xfree(stack->ptr);
277
+ ruby_xfree(stack);
278
+ }
279
+ }
280
+
281
+ static size_t rvalue_stack_memsize(const void *ptr)
282
+ {
283
+ const rvalue_stack *stack = (const rvalue_stack *)ptr;
284
+ return sizeof(rvalue_stack) + sizeof(VALUE) * stack->capa;
285
+ }
286
+
287
+ static const rb_data_type_t JSON_Parser_rvalue_stack_type = {
288
+ "JSON::Ext::Parser/rvalue_stack",
289
+ {
290
+ .dmark = rvalue_stack_mark,
291
+ .dfree = rvalue_stack_free,
292
+ .dsize = rvalue_stack_memsize,
293
+ },
294
+ 0, 0,
295
+ RUBY_TYPED_FREE_IMMEDIATELY,
296
+ };
297
+
298
+ static rvalue_stack *rvalue_stack_spill(rvalue_stack *old_stack, VALUE *handle, rvalue_stack **stack_ref)
299
+ {
300
+ rvalue_stack *stack;
301
+ *handle = TypedData_Make_Struct(0, rvalue_stack, &JSON_Parser_rvalue_stack_type, stack);
302
+ *stack_ref = stack;
303
+ MEMCPY(stack, old_stack, rvalue_stack, 1);
304
+
305
+ stack->capa = old_stack->capa << 1;
306
+ stack->ptr = ALLOC_N(VALUE, stack->capa);
307
+ stack->type = RVALUE_STACK_HEAP_ALLOCATED;
308
+ MEMCPY(stack->ptr, old_stack->ptr, VALUE, old_stack->head);
309
+ return stack;
310
+ }
311
+
312
+ static void rvalue_stack_eagerly_release(VALUE handle)
313
+ {
314
+ rvalue_stack *stack;
315
+ TypedData_Get_Struct(handle, rvalue_stack, &JSON_Parser_rvalue_stack_type, stack);
316
+ RTYPEDDATA_DATA(handle) = NULL;
317
+ rvalue_stack_free(stack);
318
+ }
319
+
320
+ /* unicode */
321
+
322
+ static const signed char digit_values[256] = {
323
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
324
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
325
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
326
+ -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1,
327
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
328
+ 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
329
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
330
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
331
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
332
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
333
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
334
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
335
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
336
+ -1, -1, -1, -1, -1, -1, -1
337
+ };
338
+
339
+ static uint32_t unescape_unicode(const unsigned char *p)
340
+ {
341
+ const uint32_t replacement_char = 0xFFFD;
342
+
343
+ signed char b;
344
+ uint32_t result = 0;
345
+ b = digit_values[p[0]];
346
+ if (b < 0) return replacement_char;
347
+ result = (result << 4) | (unsigned char)b;
348
+ b = digit_values[p[1]];
349
+ if (b < 0) return replacement_char;
350
+ result = (result << 4) | (unsigned char)b;
351
+ b = digit_values[p[2]];
352
+ if (b < 0) return replacement_char;
353
+ result = (result << 4) | (unsigned char)b;
354
+ b = digit_values[p[3]];
355
+ if (b < 0) return replacement_char;
356
+ result = (result << 4) | (unsigned char)b;
357
+ return result;
358
+ }
359
+
360
+ static int convert_UTF32_to_UTF8(char *buf, uint32_t ch)
361
+ {
362
+ int len = 1;
363
+ if (ch <= 0x7F) {
364
+ buf[0] = (char) ch;
365
+ } else if (ch <= 0x07FF) {
366
+ buf[0] = (char) ((ch >> 6) | 0xC0);
367
+ buf[1] = (char) ((ch & 0x3F) | 0x80);
368
+ len++;
369
+ } else if (ch <= 0xFFFF) {
370
+ buf[0] = (char) ((ch >> 12) | 0xE0);
371
+ buf[1] = (char) (((ch >> 6) & 0x3F) | 0x80);
372
+ buf[2] = (char) ((ch & 0x3F) | 0x80);
373
+ len += 2;
374
+ } else if (ch <= 0x1fffff) {
375
+ buf[0] =(char) ((ch >> 18) | 0xF0);
376
+ buf[1] =(char) (((ch >> 12) & 0x3F) | 0x80);
377
+ buf[2] =(char) (((ch >> 6) & 0x3F) | 0x80);
378
+ buf[3] =(char) ((ch & 0x3F) | 0x80);
379
+ len += 3;
380
+ } else {
381
+ buf[0] = '?';
382
+ }
383
+ return len;
384
+ }
385
+
386
+ typedef struct JSON_ParserStruct {
387
+ VALUE Vsource;
388
+ char *source;
389
+ long len;
390
+ char *memo;
391
+ VALUE create_id;
392
+ VALUE object_class;
393
+ VALUE array_class;
394
+ VALUE decimal_class;
395
+ VALUE match_string;
396
+ FBuffer fbuffer;
397
+ int in_array;
398
+ int max_nesting;
399
+ bool allow_nan;
400
+ bool allow_trailing_comma;
401
+ bool parsing_name;
402
+ bool symbolize_names;
403
+ bool freeze;
404
+ bool create_additions;
405
+ bool deprecated_create_additions;
406
+ rvalue_cache name_cache;
407
+ rvalue_stack *stack;
408
+ VALUE stack_handle;
409
+ } JSON_Parser;
410
+
411
+ #define GET_PARSER \
412
+ GET_PARSER_INIT; \
413
+ if (!json->Vsource) rb_raise(rb_eTypeError, "uninitialized instance")
414
+
415
+ #define GET_PARSER_INIT \
416
+ JSON_Parser *json; \
417
+ TypedData_Get_Struct(self, JSON_Parser, &JSON_Parser_type, json)
418
+
419
+ #define MinusInfinity "-Infinity"
420
+ #define EVIL 0x666
421
+
422
+ static const rb_data_type_t JSON_Parser_type;
423
+ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result);
424
+ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
425
+ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
426
+ static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result);
427
+ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting);
428
+
429
+
430
+ #define PARSE_ERROR_FRAGMENT_LEN 32
431
+ #ifdef RBIMPL_ATTR_NORETURN
432
+ RBIMPL_ATTR_NORETURN()
433
+ #endif
434
+ static void raise_parse_error(const char *format, const char *start)
435
+ {
436
+ char buffer[PARSE_ERROR_FRAGMENT_LEN + 1];
437
+
438
+ size_t len = strnlen(start, PARSE_ERROR_FRAGMENT_LEN);
439
+ const char *ptr = start;
440
+
441
+ if (len == PARSE_ERROR_FRAGMENT_LEN) {
442
+ MEMCPY(buffer, start, char, PARSE_ERROR_FRAGMENT_LEN);
443
+ buffer[PARSE_ERROR_FRAGMENT_LEN] = '\0';
444
+ ptr = buffer;
445
+ }
446
+
447
+ rb_enc_raise(enc_utf8, rb_path2class("JSON::ParserError"), format, ptr);
448
+ }
449
+
450
+
451
+
452
+ #line 475 "parser.rl"
453
+
454
+
455
+
456
+ #line 457 "parser.c"
457
+ enum {JSON_object_start = 1};
458
+ enum {JSON_object_first_final = 32};
459
+ enum {JSON_object_error = 0};
460
+
461
+ enum {JSON_object_en_main = 1};
462
+
463
+
464
+ #line 515 "parser.rl"
465
+
466
+
467
+ #define PUSH(result) rvalue_stack_push(json->stack, result, &json->stack_handle, &json->stack)
468
+
469
+ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
470
+ {
471
+ int cs = EVIL;
472
+
473
+ if (json->max_nesting && current_nesting > json->max_nesting) {
474
+ rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
475
+ }
476
+
477
+ long stack_head = json->stack->head;
478
+
479
+
480
+ #line 481 "parser.c"
481
+ {
482
+ cs = JSON_object_start;
483
+ }
484
+
485
+ #line 530 "parser.rl"
486
+
487
+ #line 488 "parser.c"
488
+ {
489
+ short _widec;
490
+ if ( p == pe )
491
+ goto _test_eof;
492
+ switch ( cs )
493
+ {
494
+ case 1:
495
+ if ( (*p) == 123 )
496
+ goto st2;
497
+ goto st0;
498
+ st0:
499
+ cs = 0;
500
+ goto _out;
501
+ st2:
502
+ if ( ++p == pe )
503
+ goto _test_eof2;
504
+ case 2:
505
+ switch( (*p) ) {
506
+ case 13: goto st2;
507
+ case 32: goto st2;
508
+ case 34: goto tr2;
509
+ case 47: goto st28;
510
+ case 125: goto tr4;
511
+ }
512
+ if ( 9 <= (*p) && (*p) <= 10 )
513
+ goto st2;
514
+ goto st0;
515
+ tr2:
516
+ #line 494 "parser.rl"
517
+ {
518
+ char *np;
519
+ json->parsing_name = true;
520
+ np = JSON_parse_string(json, p, pe, result);
521
+ json->parsing_name = false;
522
+ if (np == NULL) { p--; {p++; cs = 3; goto _out;} } else {
523
+ PUSH(*result);
524
+ {p = (( np))-1;}
525
+ }
526
+ }
527
+ goto st3;
528
+ st3:
529
+ if ( ++p == pe )
530
+ goto _test_eof3;
531
+ case 3:
532
+ #line 533 "parser.c"
533
+ switch( (*p) ) {
534
+ case 13: goto st3;
535
+ case 32: goto st3;
536
+ case 47: goto st4;
537
+ case 58: goto st8;
538
+ }
539
+ if ( 9 <= (*p) && (*p) <= 10 )
540
+ goto st3;
541
+ goto st0;
542
+ st4:
543
+ if ( ++p == pe )
544
+ goto _test_eof4;
545
+ case 4:
546
+ switch( (*p) ) {
547
+ case 42: goto st5;
548
+ case 47: goto st7;
549
+ }
550
+ goto st0;
551
+ st5:
552
+ if ( ++p == pe )
553
+ goto _test_eof5;
554
+ case 5:
555
+ if ( (*p) == 42 )
556
+ goto st6;
557
+ goto st5;
558
+ st6:
559
+ if ( ++p == pe )
560
+ goto _test_eof6;
561
+ case 6:
562
+ switch( (*p) ) {
563
+ case 42: goto st6;
564
+ case 47: goto st3;
565
+ }
566
+ goto st5;
567
+ st7:
568
+ if ( ++p == pe )
569
+ goto _test_eof7;
570
+ case 7:
571
+ if ( (*p) == 10 )
572
+ goto st3;
573
+ goto st7;
574
+ st8:
575
+ if ( ++p == pe )
576
+ goto _test_eof8;
577
+ case 8:
578
+ switch( (*p) ) {
579
+ case 13: goto st8;
580
+ case 32: goto st8;
581
+ case 34: goto tr11;
582
+ case 45: goto tr11;
583
+ case 47: goto st24;
584
+ case 73: goto tr11;
585
+ case 78: goto tr11;
586
+ case 91: goto tr11;
587
+ case 102: goto tr11;
588
+ case 110: goto tr11;
589
+ case 116: goto tr11;
590
+ case 123: goto tr11;
591
+ }
592
+ if ( (*p) > 10 ) {
593
+ if ( 48 <= (*p) && (*p) <= 57 )
594
+ goto tr11;
595
+ } else if ( (*p) >= 9 )
596
+ goto st8;
597
+ goto st0;
598
+ tr11:
599
+ #line 483 "parser.rl"
600
+ {
601
+ char *np = JSON_parse_value(json, p, pe, result, current_nesting);
602
+ if (np == NULL) {
603
+ p--; {p++; cs = 9; goto _out;}
604
+ } else {
605
+ {p = (( np))-1;}
606
+ }
607
+ }
608
+ goto st9;
609
+ st9:
610
+ if ( ++p == pe )
611
+ goto _test_eof9;
612
+ case 9:
613
+ #line 614 "parser.c"
614
+ _widec = (*p);
615
+ if ( (*p) < 13 ) {
616
+ if ( (*p) > 9 ) {
617
+ if ( 10 <= (*p) && (*p) <= 10 ) {
618
+ _widec = (short)(128 + ((*p) - -128));
619
+ if (
620
+ #line 492 "parser.rl"
621
+ json->allow_trailing_comma ) _widec += 256;
622
+ }
623
+ } else if ( (*p) >= 9 ) {
624
+ _widec = (short)(128 + ((*p) - -128));
625
+ if (
626
+ #line 492 "parser.rl"
627
+ json->allow_trailing_comma ) _widec += 256;
628
+ }
629
+ } else if ( (*p) > 13 ) {
630
+ if ( (*p) < 44 ) {
631
+ if ( 32 <= (*p) && (*p) <= 32 ) {
632
+ _widec = (short)(128 + ((*p) - -128));
633
+ if (
634
+ #line 492 "parser.rl"
635
+ json->allow_trailing_comma ) _widec += 256;
636
+ }
637
+ } else if ( (*p) > 44 ) {
638
+ if ( 47 <= (*p) && (*p) <= 47 ) {
639
+ _widec = (short)(128 + ((*p) - -128));
640
+ if (
641
+ #line 492 "parser.rl"
642
+ json->allow_trailing_comma ) _widec += 256;
643
+ }
644
+ } else {
645
+ _widec = (short)(128 + ((*p) - -128));
646
+ if (
647
+ #line 492 "parser.rl"
648
+ json->allow_trailing_comma ) _widec += 256;
649
+ }
650
+ } else {
651
+ _widec = (short)(128 + ((*p) - -128));
652
+ if (
653
+ #line 492 "parser.rl"
654
+ json->allow_trailing_comma ) _widec += 256;
655
+ }
656
+ switch( _widec ) {
657
+ case 125: goto tr4;
658
+ case 269: goto st10;
659
+ case 288: goto st10;
660
+ case 300: goto st11;
661
+ case 303: goto st16;
662
+ case 525: goto st9;
663
+ case 544: goto st9;
664
+ case 556: goto st2;
665
+ case 559: goto st20;
666
+ }
667
+ if ( _widec > 266 ) {
668
+ if ( 521 <= _widec && _widec <= 522 )
669
+ goto st9;
670
+ } else if ( _widec >= 265 )
671
+ goto st10;
672
+ goto st0;
673
+ tr4:
674
+ #line 505 "parser.rl"
675
+ { p--; {p++; cs = 32; goto _out;} }
676
+ goto st32;
677
+ st32:
678
+ if ( ++p == pe )
679
+ goto _test_eof32;
680
+ case 32:
681
+ #line 682 "parser.c"
682
+ goto st0;
683
+ st10:
684
+ if ( ++p == pe )
685
+ goto _test_eof10;
686
+ case 10:
687
+ switch( (*p) ) {
688
+ case 13: goto st10;
689
+ case 32: goto st10;
690
+ case 44: goto st11;
691
+ case 47: goto st16;
692
+ case 125: goto tr4;
693
+ }
694
+ if ( 9 <= (*p) && (*p) <= 10 )
695
+ goto st10;
696
+ goto st0;
697
+ st11:
698
+ if ( ++p == pe )
699
+ goto _test_eof11;
700
+ case 11:
701
+ switch( (*p) ) {
702
+ case 13: goto st11;
703
+ case 32: goto st11;
704
+ case 34: goto tr2;
705
+ case 47: goto st12;
706
+ }
707
+ if ( 9 <= (*p) && (*p) <= 10 )
708
+ goto st11;
709
+ goto st0;
710
+ st12:
711
+ if ( ++p == pe )
712
+ goto _test_eof12;
713
+ case 12:
714
+ switch( (*p) ) {
715
+ case 42: goto st13;
716
+ case 47: goto st15;
717
+ }
718
+ goto st0;
719
+ st13:
720
+ if ( ++p == pe )
721
+ goto _test_eof13;
722
+ case 13:
723
+ if ( (*p) == 42 )
724
+ goto st14;
725
+ goto st13;
726
+ st14:
727
+ if ( ++p == pe )
728
+ goto _test_eof14;
729
+ case 14:
730
+ switch( (*p) ) {
731
+ case 42: goto st14;
732
+ case 47: goto st11;
733
+ }
734
+ goto st13;
735
+ st15:
736
+ if ( ++p == pe )
737
+ goto _test_eof15;
738
+ case 15:
739
+ if ( (*p) == 10 )
740
+ goto st11;
741
+ goto st15;
742
+ st16:
743
+ if ( ++p == pe )
744
+ goto _test_eof16;
745
+ case 16:
746
+ switch( (*p) ) {
747
+ case 42: goto st17;
748
+ case 47: goto st19;
749
+ }
750
+ goto st0;
751
+ st17:
752
+ if ( ++p == pe )
753
+ goto _test_eof17;
754
+ case 17:
755
+ if ( (*p) == 42 )
756
+ goto st18;
757
+ goto st17;
758
+ st18:
759
+ if ( ++p == pe )
760
+ goto _test_eof18;
761
+ case 18:
762
+ switch( (*p) ) {
763
+ case 42: goto st18;
764
+ case 47: goto st10;
765
+ }
766
+ goto st17;
767
+ st19:
768
+ if ( ++p == pe )
769
+ goto _test_eof19;
770
+ case 19:
771
+ if ( (*p) == 10 )
772
+ goto st10;
773
+ goto st19;
774
+ st20:
775
+ if ( ++p == pe )
776
+ goto _test_eof20;
777
+ case 20:
778
+ _widec = (*p);
779
+ if ( (*p) > 42 ) {
780
+ if ( 47 <= (*p) && (*p) <= 47 ) {
781
+ _widec = (short)(128 + ((*p) - -128));
782
+ if (
783
+ #line 492 "parser.rl"
784
+ json->allow_trailing_comma ) _widec += 256;
785
+ }
786
+ } else if ( (*p) >= 42 ) {
787
+ _widec = (short)(128 + ((*p) - -128));
788
+ if (
789
+ #line 492 "parser.rl"
790
+ json->allow_trailing_comma ) _widec += 256;
791
+ }
792
+ switch( _widec ) {
793
+ case 298: goto st17;
794
+ case 303: goto st19;
795
+ case 554: goto st21;
796
+ case 559: goto st23;
797
+ }
798
+ goto st0;
799
+ st21:
800
+ if ( ++p == pe )
801
+ goto _test_eof21;
802
+ case 21:
803
+ _widec = (*p);
804
+ if ( (*p) < 42 ) {
805
+ if ( (*p) <= 41 ) {
806
+ _widec = (short)(128 + ((*p) - -128));
807
+ if (
808
+ #line 492 "parser.rl"
809
+ json->allow_trailing_comma ) _widec += 256;
810
+ }
811
+ } else if ( (*p) > 42 ) {
812
+ if ( 43 <= (*p) )
813
+ { _widec = (short)(128 + ((*p) - -128));
814
+ if (
815
+ #line 492 "parser.rl"
816
+ json->allow_trailing_comma ) _widec += 256;
817
+ }
818
+ } else {
819
+ _widec = (short)(128 + ((*p) - -128));
820
+ if (
821
+ #line 492 "parser.rl"
822
+ json->allow_trailing_comma ) _widec += 256;
823
+ }
824
+ switch( _widec ) {
825
+ case 298: goto st18;
826
+ case 554: goto st22;
827
+ }
828
+ if ( _widec > 383 ) {
829
+ if ( 384 <= _widec && _widec <= 639 )
830
+ goto st21;
831
+ } else if ( _widec >= 128 )
832
+ goto st17;
833
+ goto st0;
834
+ st22:
835
+ if ( ++p == pe )
836
+ goto _test_eof22;
837
+ case 22:
838
+ _widec = (*p);
839
+ if ( (*p) < 43 ) {
840
+ if ( (*p) > 41 ) {
841
+ if ( 42 <= (*p) && (*p) <= 42 ) {
842
+ _widec = (short)(128 + ((*p) - -128));
843
+ if (
844
+ #line 492 "parser.rl"
845
+ json->allow_trailing_comma ) _widec += 256;
846
+ }
847
+ } else {
848
+ _widec = (short)(128 + ((*p) - -128));
849
+ if (
850
+ #line 492 "parser.rl"
851
+ json->allow_trailing_comma ) _widec += 256;
852
+ }
853
+ } else if ( (*p) > 46 ) {
854
+ if ( (*p) > 47 ) {
855
+ if ( 48 <= (*p) )
856
+ { _widec = (short)(128 + ((*p) - -128));
857
+ if (
858
+ #line 492 "parser.rl"
859
+ json->allow_trailing_comma ) _widec += 256;
860
+ }
861
+ } else if ( (*p) >= 47 ) {
862
+ _widec = (short)(128 + ((*p) - -128));
863
+ if (
864
+ #line 492 "parser.rl"
865
+ json->allow_trailing_comma ) _widec += 256;
866
+ }
867
+ } else {
868
+ _widec = (short)(128 + ((*p) - -128));
869
+ if (
870
+ #line 492 "parser.rl"
871
+ json->allow_trailing_comma ) _widec += 256;
872
+ }
873
+ switch( _widec ) {
874
+ case 298: goto st18;
875
+ case 303: goto st10;
876
+ case 554: goto st22;
877
+ case 559: goto st9;
878
+ }
879
+ if ( _widec > 383 ) {
880
+ if ( 384 <= _widec && _widec <= 639 )
881
+ goto st21;
882
+ } else if ( _widec >= 128 )
883
+ goto st17;
884
+ goto st0;
885
+ st23:
886
+ if ( ++p == pe )
887
+ goto _test_eof23;
888
+ case 23:
889
+ _widec = (*p);
890
+ if ( (*p) < 10 ) {
891
+ if ( (*p) <= 9 ) {
892
+ _widec = (short)(128 + ((*p) - -128));
893
+ if (
894
+ #line 492 "parser.rl"
895
+ json->allow_trailing_comma ) _widec += 256;
896
+ }
897
+ } else if ( (*p) > 10 ) {
898
+ if ( 11 <= (*p) )
899
+ { _widec = (short)(128 + ((*p) - -128));
900
+ if (
901
+ #line 492 "parser.rl"
902
+ json->allow_trailing_comma ) _widec += 256;
903
+ }
904
+ } else {
905
+ _widec = (short)(128 + ((*p) - -128));
906
+ if (
907
+ #line 492 "parser.rl"
908
+ json->allow_trailing_comma ) _widec += 256;
909
+ }
910
+ switch( _widec ) {
911
+ case 266: goto st10;
912
+ case 522: goto st9;
913
+ }
914
+ if ( _widec > 383 ) {
915
+ if ( 384 <= _widec && _widec <= 639 )
916
+ goto st23;
917
+ } else if ( _widec >= 128 )
918
+ goto st19;
919
+ goto st0;
920
+ st24:
921
+ if ( ++p == pe )
922
+ goto _test_eof24;
923
+ case 24:
924
+ switch( (*p) ) {
925
+ case 42: goto st25;
926
+ case 47: goto st27;
927
+ }
928
+ goto st0;
929
+ st25:
930
+ if ( ++p == pe )
931
+ goto _test_eof25;
932
+ case 25:
933
+ if ( (*p) == 42 )
934
+ goto st26;
935
+ goto st25;
936
+ st26:
937
+ if ( ++p == pe )
938
+ goto _test_eof26;
939
+ case 26:
940
+ switch( (*p) ) {
941
+ case 42: goto st26;
942
+ case 47: goto st8;
943
+ }
944
+ goto st25;
945
+ st27:
946
+ if ( ++p == pe )
947
+ goto _test_eof27;
948
+ case 27:
949
+ if ( (*p) == 10 )
950
+ goto st8;
951
+ goto st27;
952
+ st28:
953
+ if ( ++p == pe )
954
+ goto _test_eof28;
955
+ case 28:
956
+ switch( (*p) ) {
957
+ case 42: goto st29;
958
+ case 47: goto st31;
959
+ }
960
+ goto st0;
961
+ st29:
962
+ if ( ++p == pe )
963
+ goto _test_eof29;
964
+ case 29:
965
+ if ( (*p) == 42 )
966
+ goto st30;
967
+ goto st29;
968
+ st30:
969
+ if ( ++p == pe )
970
+ goto _test_eof30;
971
+ case 30:
972
+ switch( (*p) ) {
973
+ case 42: goto st30;
974
+ case 47: goto st2;
975
+ }
976
+ goto st29;
977
+ st31:
978
+ if ( ++p == pe )
979
+ goto _test_eof31;
980
+ case 31:
981
+ if ( (*p) == 10 )
982
+ goto st2;
983
+ goto st31;
984
+ }
985
+ _test_eof2: cs = 2; goto _test_eof;
986
+ _test_eof3: cs = 3; goto _test_eof;
987
+ _test_eof4: cs = 4; goto _test_eof;
988
+ _test_eof5: cs = 5; goto _test_eof;
989
+ _test_eof6: cs = 6; goto _test_eof;
990
+ _test_eof7: cs = 7; goto _test_eof;
991
+ _test_eof8: cs = 8; goto _test_eof;
992
+ _test_eof9: cs = 9; goto _test_eof;
993
+ _test_eof32: cs = 32; goto _test_eof;
994
+ _test_eof10: cs = 10; goto _test_eof;
995
+ _test_eof11: cs = 11; goto _test_eof;
996
+ _test_eof12: cs = 12; goto _test_eof;
997
+ _test_eof13: cs = 13; goto _test_eof;
998
+ _test_eof14: cs = 14; goto _test_eof;
999
+ _test_eof15: cs = 15; goto _test_eof;
1000
+ _test_eof16: cs = 16; goto _test_eof;
1001
+ _test_eof17: cs = 17; goto _test_eof;
1002
+ _test_eof18: cs = 18; goto _test_eof;
1003
+ _test_eof19: cs = 19; goto _test_eof;
1004
+ _test_eof20: cs = 20; goto _test_eof;
1005
+ _test_eof21: cs = 21; goto _test_eof;
1006
+ _test_eof22: cs = 22; goto _test_eof;
1007
+ _test_eof23: cs = 23; goto _test_eof;
1008
+ _test_eof24: cs = 24; goto _test_eof;
1009
+ _test_eof25: cs = 25; goto _test_eof;
1010
+ _test_eof26: cs = 26; goto _test_eof;
1011
+ _test_eof27: cs = 27; goto _test_eof;
1012
+ _test_eof28: cs = 28; goto _test_eof;
1013
+ _test_eof29: cs = 29; goto _test_eof;
1014
+ _test_eof30: cs = 30; goto _test_eof;
1015
+ _test_eof31: cs = 31; goto _test_eof;
1016
+
1017
+ _test_eof: {}
1018
+ _out: {}
1019
+ }
1020
+
1021
+ #line 531 "parser.rl"
1022
+
1023
+ if (cs >= JSON_object_first_final) {
1024
+ long count = json->stack->head - stack_head;
1025
+
1026
+ if (RB_UNLIKELY(json->object_class)) {
1027
+ VALUE object = rb_class_new_instance(0, 0, json->object_class);
1028
+ long index = 0;
1029
+ VALUE *items = rvalue_stack_peek(json->stack, count);
1030
+ while (index < count) {
1031
+ VALUE name = items[index++];
1032
+ VALUE value = items[index++];
1033
+ rb_funcall(object, i_aset, 2, name, value);
1034
+ }
1035
+ *result = object;
1036
+ } else {
1037
+ VALUE hash;
1038
+ #ifdef HAVE_RB_HASH_NEW_CAPA
1039
+ hash = rb_hash_new_capa(count >> 1);
1040
+ #else
1041
+ hash = rb_hash_new();
1042
+ #endif
1043
+ rb_hash_bulk_insert(count, rvalue_stack_peek(json->stack, count), hash);
1044
+ *result = hash;
1045
+ }
1046
+ rvalue_stack_pop(json->stack, count);
1047
+
1048
+ if (RB_UNLIKELY(json->create_additions)) {
1049
+ VALUE klassname;
1050
+ if (json->object_class) {
1051
+ klassname = rb_funcall(*result, i_aref, 1, json->create_id);
1052
+ } else {
1053
+ klassname = rb_hash_aref(*result, json->create_id);
1054
+ }
1055
+ if (!NIL_P(klassname)) {
1056
+ VALUE klass = rb_funcall(mJSON, i_deep_const_get, 1, klassname);
1057
+ if (RTEST(rb_funcall(klass, i_json_creatable_p, 0))) {
1058
+ if (json->deprecated_create_additions) {
1059
+ json_deprecated(deprecated_create_additions_warning);
1060
+ }
1061
+ *result = rb_funcall(klass, i_json_create, 1, *result);
1062
+ }
1063
+ }
1064
+ }
1065
+ return p + 1;
1066
+ } else {
1067
+ return NULL;
1068
+ }
1069
+ }
1070
+
1071
+
1072
+ #line 1073 "parser.c"
1073
+ enum {JSON_value_start = 1};
1074
+ enum {JSON_value_first_final = 29};
1075
+ enum {JSON_value_error = 0};
1076
+
1077
+ enum {JSON_value_en_main = 1};
1078
+
1079
+
1080
+ #line 664 "parser.rl"
1081
+
1082
+
1083
+ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
1084
+ {
1085
+ int cs = EVIL;
1086
+
1087
+
1088
+ #line 1089 "parser.c"
1089
+ {
1090
+ cs = JSON_value_start;
1091
+ }
1092
+
1093
+ #line 671 "parser.rl"
1094
+
1095
+ #line 1096 "parser.c"
1096
+ {
1097
+ if ( p == pe )
1098
+ goto _test_eof;
1099
+ switch ( cs )
1100
+ {
1101
+ st1:
1102
+ if ( ++p == pe )
1103
+ goto _test_eof1;
1104
+ case 1:
1105
+ switch( (*p) ) {
1106
+ case 13: goto st1;
1107
+ case 32: goto st1;
1108
+ case 34: goto tr2;
1109
+ case 45: goto tr3;
1110
+ case 47: goto st6;
1111
+ case 73: goto st10;
1112
+ case 78: goto st17;
1113
+ case 91: goto tr7;
1114
+ case 102: goto st19;
1115
+ case 110: goto st23;
1116
+ case 116: goto st26;
1117
+ case 123: goto tr11;
1118
+ }
1119
+ if ( (*p) > 10 ) {
1120
+ if ( 48 <= (*p) && (*p) <= 57 )
1121
+ goto tr3;
1122
+ } else if ( (*p) >= 9 )
1123
+ goto st1;
1124
+ goto st0;
1125
+ st0:
1126
+ cs = 0;
1127
+ goto _out;
1128
+ tr2:
1129
+ #line 609 "parser.rl"
1130
+ {
1131
+ char *np = JSON_parse_string(json, p, pe, result);
1132
+ if (np == NULL) {
1133
+ p--;
1134
+ {p++; cs = 29; goto _out;}
1135
+ } else {
1136
+ {p = (( np))-1;}
1137
+ }
1138
+ }
1139
+ goto st29;
1140
+ tr3:
1141
+ #line 619 "parser.rl"
1142
+ {
1143
+ char *np;
1144
+ if(pe > p + 8 && !strncmp(MinusInfinity, p, 9)) {
1145
+ if (json->allow_nan) {
1146
+ *result = CMinusInfinity;
1147
+ {p = (( p + 10))-1;}
1148
+ p--; {p++; cs = 29; goto _out;}
1149
+ } else {
1150
+ raise_parse_error("unexpected token at '%s'", p);
1151
+ }
1152
+ }
1153
+ np = JSON_parse_number(json, p, pe, result);
1154
+ if (np != NULL) {
1155
+ {p = (( np))-1;}
1156
+ }
1157
+ p--; {p++; cs = 29; goto _out;}
1158
+ }
1159
+ goto st29;
1160
+ tr7:
1161
+ #line 637 "parser.rl"
1162
+ {
1163
+ char *np;
1164
+ json->in_array++;
1165
+ np = JSON_parse_array(json, p, pe, result, current_nesting + 1);
1166
+ json->in_array--;
1167
+ if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
1168
+ }
1169
+ goto st29;
1170
+ tr11:
1171
+ #line 645 "parser.rl"
1172
+ {
1173
+ char *np;
1174
+ np = JSON_parse_object(json, p, pe, result, current_nesting + 1);
1175
+ if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
1176
+ }
1177
+ goto st29;
1178
+ tr25:
1179
+ #line 602 "parser.rl"
1180
+ {
1181
+ if (json->allow_nan) {
1182
+ *result = CInfinity;
1183
+ } else {
1184
+ raise_parse_error("unexpected token at '%s'", p - 7);
1185
+ }
1186
+ }
1187
+ goto st29;
1188
+ tr27:
1189
+ #line 595 "parser.rl"
1190
+ {
1191
+ if (json->allow_nan) {
1192
+ *result = CNaN;
1193
+ } else {
1194
+ raise_parse_error("unexpected token at '%s'", p - 2);
1195
+ }
1196
+ }
1197
+ goto st29;
1198
+ tr31:
1199
+ #line 589 "parser.rl"
1200
+ {
1201
+ *result = Qfalse;
1202
+ }
1203
+ goto st29;
1204
+ tr34:
1205
+ #line 586 "parser.rl"
1206
+ {
1207
+ *result = Qnil;
1208
+ }
1209
+ goto st29;
1210
+ tr37:
1211
+ #line 592 "parser.rl"
1212
+ {
1213
+ *result = Qtrue;
1214
+ }
1215
+ goto st29;
1216
+ st29:
1217
+ if ( ++p == pe )
1218
+ goto _test_eof29;
1219
+ case 29:
1220
+ #line 651 "parser.rl"
1221
+ { p--; {p++; cs = 29; goto _out;} }
1222
+ #line 1223 "parser.c"
1223
+ switch( (*p) ) {
1224
+ case 13: goto st29;
1225
+ case 32: goto st29;
1226
+ case 47: goto st2;
1227
+ }
1228
+ if ( 9 <= (*p) && (*p) <= 10 )
1229
+ goto st29;
1230
+ goto st0;
1231
+ st2:
1232
+ if ( ++p == pe )
1233
+ goto _test_eof2;
1234
+ case 2:
1235
+ switch( (*p) ) {
1236
+ case 42: goto st3;
1237
+ case 47: goto st5;
1238
+ }
1239
+ goto st0;
1240
+ st3:
1241
+ if ( ++p == pe )
1242
+ goto _test_eof3;
1243
+ case 3:
1244
+ if ( (*p) == 42 )
1245
+ goto st4;
1246
+ goto st3;
1247
+ st4:
1248
+ if ( ++p == pe )
1249
+ goto _test_eof4;
1250
+ case 4:
1251
+ switch( (*p) ) {
1252
+ case 42: goto st4;
1253
+ case 47: goto st29;
1254
+ }
1255
+ goto st3;
1256
+ st5:
1257
+ if ( ++p == pe )
1258
+ goto _test_eof5;
1259
+ case 5:
1260
+ if ( (*p) == 10 )
1261
+ goto st29;
1262
+ goto st5;
1263
+ st6:
1264
+ if ( ++p == pe )
1265
+ goto _test_eof6;
1266
+ case 6:
1267
+ switch( (*p) ) {
1268
+ case 42: goto st7;
1269
+ case 47: goto st9;
1270
+ }
1271
+ goto st0;
1272
+ st7:
1273
+ if ( ++p == pe )
1274
+ goto _test_eof7;
1275
+ case 7:
1276
+ if ( (*p) == 42 )
1277
+ goto st8;
1278
+ goto st7;
1279
+ st8:
1280
+ if ( ++p == pe )
1281
+ goto _test_eof8;
1282
+ case 8:
1283
+ switch( (*p) ) {
1284
+ case 42: goto st8;
1285
+ case 47: goto st1;
1286
+ }
1287
+ goto st7;
1288
+ st9:
1289
+ if ( ++p == pe )
1290
+ goto _test_eof9;
1291
+ case 9:
1292
+ if ( (*p) == 10 )
1293
+ goto st1;
1294
+ goto st9;
1295
+ st10:
1296
+ if ( ++p == pe )
1297
+ goto _test_eof10;
1298
+ case 10:
1299
+ if ( (*p) == 110 )
1300
+ goto st11;
1301
+ goto st0;
1302
+ st11:
1303
+ if ( ++p == pe )
1304
+ goto _test_eof11;
1305
+ case 11:
1306
+ if ( (*p) == 102 )
1307
+ goto st12;
1308
+ goto st0;
1309
+ st12:
1310
+ if ( ++p == pe )
1311
+ goto _test_eof12;
1312
+ case 12:
1313
+ if ( (*p) == 105 )
1314
+ goto st13;
1315
+ goto st0;
1316
+ st13:
1317
+ if ( ++p == pe )
1318
+ goto _test_eof13;
1319
+ case 13:
1320
+ if ( (*p) == 110 )
1321
+ goto st14;
1322
+ goto st0;
1323
+ st14:
1324
+ if ( ++p == pe )
1325
+ goto _test_eof14;
1326
+ case 14:
1327
+ if ( (*p) == 105 )
1328
+ goto st15;
1329
+ goto st0;
1330
+ st15:
1331
+ if ( ++p == pe )
1332
+ goto _test_eof15;
1333
+ case 15:
1334
+ if ( (*p) == 116 )
1335
+ goto st16;
1336
+ goto st0;
1337
+ st16:
1338
+ if ( ++p == pe )
1339
+ goto _test_eof16;
1340
+ case 16:
1341
+ if ( (*p) == 121 )
1342
+ goto tr25;
1343
+ goto st0;
1344
+ st17:
1345
+ if ( ++p == pe )
1346
+ goto _test_eof17;
1347
+ case 17:
1348
+ if ( (*p) == 97 )
1349
+ goto st18;
1350
+ goto st0;
1351
+ st18:
1352
+ if ( ++p == pe )
1353
+ goto _test_eof18;
1354
+ case 18:
1355
+ if ( (*p) == 78 )
1356
+ goto tr27;
1357
+ goto st0;
1358
+ st19:
1359
+ if ( ++p == pe )
1360
+ goto _test_eof19;
1361
+ case 19:
1362
+ if ( (*p) == 97 )
1363
+ goto st20;
1364
+ goto st0;
1365
+ st20:
1366
+ if ( ++p == pe )
1367
+ goto _test_eof20;
1368
+ case 20:
1369
+ if ( (*p) == 108 )
1370
+ goto st21;
1371
+ goto st0;
1372
+ st21:
1373
+ if ( ++p == pe )
1374
+ goto _test_eof21;
1375
+ case 21:
1376
+ if ( (*p) == 115 )
1377
+ goto st22;
1378
+ goto st0;
1379
+ st22:
1380
+ if ( ++p == pe )
1381
+ goto _test_eof22;
1382
+ case 22:
1383
+ if ( (*p) == 101 )
1384
+ goto tr31;
1385
+ goto st0;
1386
+ st23:
1387
+ if ( ++p == pe )
1388
+ goto _test_eof23;
1389
+ case 23:
1390
+ if ( (*p) == 117 )
1391
+ goto st24;
1392
+ goto st0;
1393
+ st24:
1394
+ if ( ++p == pe )
1395
+ goto _test_eof24;
1396
+ case 24:
1397
+ if ( (*p) == 108 )
1398
+ goto st25;
1399
+ goto st0;
1400
+ st25:
1401
+ if ( ++p == pe )
1402
+ goto _test_eof25;
1403
+ case 25:
1404
+ if ( (*p) == 108 )
1405
+ goto tr34;
1406
+ goto st0;
1407
+ st26:
1408
+ if ( ++p == pe )
1409
+ goto _test_eof26;
1410
+ case 26:
1411
+ if ( (*p) == 114 )
1412
+ goto st27;
1413
+ goto st0;
1414
+ st27:
1415
+ if ( ++p == pe )
1416
+ goto _test_eof27;
1417
+ case 27:
1418
+ if ( (*p) == 117 )
1419
+ goto st28;
1420
+ goto st0;
1421
+ st28:
1422
+ if ( ++p == pe )
1423
+ goto _test_eof28;
1424
+ case 28:
1425
+ if ( (*p) == 101 )
1426
+ goto tr37;
1427
+ goto st0;
1428
+ }
1429
+ _test_eof1: cs = 1; goto _test_eof;
1430
+ _test_eof29: cs = 29; goto _test_eof;
1431
+ _test_eof2: cs = 2; goto _test_eof;
1432
+ _test_eof3: cs = 3; goto _test_eof;
1433
+ _test_eof4: cs = 4; goto _test_eof;
1434
+ _test_eof5: cs = 5; goto _test_eof;
1435
+ _test_eof6: cs = 6; goto _test_eof;
1436
+ _test_eof7: cs = 7; goto _test_eof;
1437
+ _test_eof8: cs = 8; goto _test_eof;
1438
+ _test_eof9: cs = 9; goto _test_eof;
1439
+ _test_eof10: cs = 10; goto _test_eof;
1440
+ _test_eof11: cs = 11; goto _test_eof;
1441
+ _test_eof12: cs = 12; goto _test_eof;
1442
+ _test_eof13: cs = 13; goto _test_eof;
1443
+ _test_eof14: cs = 14; goto _test_eof;
1444
+ _test_eof15: cs = 15; goto _test_eof;
1445
+ _test_eof16: cs = 16; goto _test_eof;
1446
+ _test_eof17: cs = 17; goto _test_eof;
1447
+ _test_eof18: cs = 18; goto _test_eof;
1448
+ _test_eof19: cs = 19; goto _test_eof;
1449
+ _test_eof20: cs = 20; goto _test_eof;
1450
+ _test_eof21: cs = 21; goto _test_eof;
1451
+ _test_eof22: cs = 22; goto _test_eof;
1452
+ _test_eof23: cs = 23; goto _test_eof;
1453
+ _test_eof24: cs = 24; goto _test_eof;
1454
+ _test_eof25: cs = 25; goto _test_eof;
1455
+ _test_eof26: cs = 26; goto _test_eof;
1456
+ _test_eof27: cs = 27; goto _test_eof;
1457
+ _test_eof28: cs = 28; goto _test_eof;
1458
+
1459
+ _test_eof: {}
1460
+ _out: {}
1461
+ }
1462
+
1463
+ #line 672 "parser.rl"
1464
+
1465
+ if (json->freeze) {
1466
+ OBJ_FREEZE(*result);
1467
+ }
1468
+
1469
+ if (cs >= JSON_value_first_final) {
1470
+ PUSH(*result);
1471
+ return p;
1472
+ } else {
1473
+ return NULL;
1474
+ }
1475
+ }
1476
+
1477
+
1478
+ #line 1479 "parser.c"
1479
+ enum {JSON_integer_start = 1};
1480
+ enum {JSON_integer_first_final = 3};
1481
+ enum {JSON_integer_error = 0};
1482
+
1483
+ enum {JSON_integer_en_main = 1};
1484
+
1485
+
1486
+ #line 693 "parser.rl"
1487
+
1488
+
1489
+ #define MAX_FAST_INTEGER_SIZE 18
1490
+ static inline VALUE fast_parse_integer(char *p, char *pe)
1491
+ {
1492
+ bool negative = false;
1493
+ if (*p == '-') {
1494
+ negative = true;
1495
+ p++;
1496
+ }
1497
+
1498
+ long long memo = 0;
1499
+ while (p < pe) {
1500
+ memo *= 10;
1501
+ memo += *p - '0';
1502
+ p++;
1503
+ }
1504
+
1505
+ if (negative) {
1506
+ memo = -memo;
1507
+ }
1508
+ return LL2NUM(memo);
1509
+ }
1510
+
1511
+ static char *JSON_decode_integer(JSON_Parser *json, char *p, VALUE *result)
1512
+ {
1513
+ long len = p - json->memo;
1514
+ if (RB_LIKELY(len < MAX_FAST_INTEGER_SIZE)) {
1515
+ *result = fast_parse_integer(json->memo, p);
1516
+ } else {
1517
+ fbuffer_clear(&json->fbuffer);
1518
+ fbuffer_append(&json->fbuffer, json->memo, len);
1519
+ fbuffer_append_char(&json->fbuffer, '\0');
1520
+ *result = rb_cstr2inum(FBUFFER_PTR(&json->fbuffer), 10);
1521
+ }
1522
+ return p + 1;
1523
+ }
1524
+
1525
+
1526
+ #line 1527 "parser.c"
1527
+ enum {JSON_float_start = 1};
1528
+ enum {JSON_float_first_final = 6};
1529
+ enum {JSON_float_error = 0};
1530
+
1531
+ enum {JSON_float_en_main = 1};
1532
+
1533
+
1534
+ #line 745 "parser.rl"
1535
+
1536
+
1537
+ static char *JSON_parse_number(JSON_Parser *json, char *p, char *pe, VALUE *result)
1538
+ {
1539
+ int cs = EVIL;
1540
+ bool is_float = false;
1541
+
1542
+
1543
+ #line 1544 "parser.c"
1544
+ {
1545
+ cs = JSON_float_start;
1546
+ }
1547
+
1548
+ #line 753 "parser.rl"
1549
+ json->memo = p;
1550
+
1551
+ #line 1552 "parser.c"
1552
+ {
1553
+ if ( p == pe )
1554
+ goto _test_eof;
1555
+ switch ( cs )
1556
+ {
1557
+ case 1:
1558
+ switch( (*p) ) {
1559
+ case 45: goto st2;
1560
+ case 48: goto st6;
1561
+ }
1562
+ if ( 49 <= (*p) && (*p) <= 57 )
1563
+ goto st10;
1564
+ goto st0;
1565
+ st0:
1566
+ cs = 0;
1567
+ goto _out;
1568
+ st2:
1569
+ if ( ++p == pe )
1570
+ goto _test_eof2;
1571
+ case 2:
1572
+ if ( (*p) == 48 )
1573
+ goto st6;
1574
+ if ( 49 <= (*p) && (*p) <= 57 )
1575
+ goto st10;
1576
+ goto st0;
1577
+ st6:
1578
+ if ( ++p == pe )
1579
+ goto _test_eof6;
1580
+ case 6:
1581
+ switch( (*p) ) {
1582
+ case 45: goto st0;
1583
+ case 46: goto tr8;
1584
+ case 69: goto tr9;
1585
+ case 101: goto tr9;
1586
+ }
1587
+ if ( 48 <= (*p) && (*p) <= 57 )
1588
+ goto st0;
1589
+ goto tr7;
1590
+ tr7:
1591
+ #line 737 "parser.rl"
1592
+ { p--; {p++; cs = 7; goto _out;} }
1593
+ goto st7;
1594
+ st7:
1595
+ if ( ++p == pe )
1596
+ goto _test_eof7;
1597
+ case 7:
1598
+ #line 1599 "parser.c"
1599
+ goto st0;
1600
+ tr8:
1601
+ #line 738 "parser.rl"
1602
+ { is_float = true; }
1603
+ goto st3;
1604
+ st3:
1605
+ if ( ++p == pe )
1606
+ goto _test_eof3;
1607
+ case 3:
1608
+ #line 1609 "parser.c"
1609
+ if ( 48 <= (*p) && (*p) <= 57 )
1610
+ goto st8;
1611
+ goto st0;
1612
+ st8:
1613
+ if ( ++p == pe )
1614
+ goto _test_eof8;
1615
+ case 8:
1616
+ switch( (*p) ) {
1617
+ case 69: goto st4;
1618
+ case 101: goto st4;
1619
+ }
1620
+ if ( (*p) > 46 ) {
1621
+ if ( 48 <= (*p) && (*p) <= 57 )
1622
+ goto st8;
1623
+ } else if ( (*p) >= 45 )
1624
+ goto st0;
1625
+ goto tr7;
1626
+ tr9:
1627
+ #line 738 "parser.rl"
1628
+ { is_float = true; }
1629
+ goto st4;
1630
+ st4:
1631
+ if ( ++p == pe )
1632
+ goto _test_eof4;
1633
+ case 4:
1634
+ #line 1635 "parser.c"
1635
+ switch( (*p) ) {
1636
+ case 43: goto st5;
1637
+ case 45: goto st5;
1638
+ }
1639
+ if ( 48 <= (*p) && (*p) <= 57 )
1640
+ goto st9;
1641
+ goto st0;
1642
+ st5:
1643
+ if ( ++p == pe )
1644
+ goto _test_eof5;
1645
+ case 5:
1646
+ if ( 48 <= (*p) && (*p) <= 57 )
1647
+ goto st9;
1648
+ goto st0;
1649
+ st9:
1650
+ if ( ++p == pe )
1651
+ goto _test_eof9;
1652
+ case 9:
1653
+ switch( (*p) ) {
1654
+ case 69: goto st0;
1655
+ case 101: goto st0;
1656
+ }
1657
+ if ( (*p) > 46 ) {
1658
+ if ( 48 <= (*p) && (*p) <= 57 )
1659
+ goto st9;
1660
+ } else if ( (*p) >= 45 )
1661
+ goto st0;
1662
+ goto tr7;
1663
+ st10:
1664
+ if ( ++p == pe )
1665
+ goto _test_eof10;
1666
+ case 10:
1667
+ switch( (*p) ) {
1668
+ case 45: goto st0;
1669
+ case 46: goto tr8;
1670
+ case 69: goto tr9;
1671
+ case 101: goto tr9;
1672
+ }
1673
+ if ( 48 <= (*p) && (*p) <= 57 )
1674
+ goto st10;
1675
+ goto tr7;
1676
+ }
1677
+ _test_eof2: cs = 2; goto _test_eof;
1678
+ _test_eof6: cs = 6; goto _test_eof;
1679
+ _test_eof7: cs = 7; goto _test_eof;
1680
+ _test_eof3: cs = 3; goto _test_eof;
1681
+ _test_eof8: cs = 8; goto _test_eof;
1682
+ _test_eof4: cs = 4; goto _test_eof;
1683
+ _test_eof5: cs = 5; goto _test_eof;
1684
+ _test_eof9: cs = 9; goto _test_eof;
1685
+ _test_eof10: cs = 10; goto _test_eof;
1686
+
1687
+ _test_eof: {}
1688
+ _out: {}
1689
+ }
1690
+
1691
+ #line 755 "parser.rl"
1692
+
1693
+ if (cs >= JSON_float_first_final) {
1694
+ if (!is_float) {
1695
+ return JSON_decode_integer(json, p, result);
1696
+ }
1697
+ VALUE mod = Qnil;
1698
+ ID method_id = 0;
1699
+ if (json->decimal_class) {
1700
+ if (rb_respond_to(json->decimal_class, i_try_convert)) {
1701
+ mod = json->decimal_class;
1702
+ method_id = i_try_convert;
1703
+ } else if (rb_respond_to(json->decimal_class, i_new)) {
1704
+ mod = json->decimal_class;
1705
+ method_id = i_new;
1706
+ } else if (RB_TYPE_P(json->decimal_class, T_CLASS)) {
1707
+ VALUE name = rb_class_name(json->decimal_class);
1708
+ const char *name_cstr = RSTRING_PTR(name);
1709
+ const char *last_colon = strrchr(name_cstr, ':');
1710
+ if (last_colon) {
1711
+ const char *mod_path_end = last_colon - 1;
1712
+ VALUE mod_path = rb_str_substr(name, 0, mod_path_end - name_cstr);
1713
+ mod = rb_path_to_class(mod_path);
1714
+
1715
+ const char *method_name_beg = last_colon + 1;
1716
+ long before_len = method_name_beg - name_cstr;
1717
+ long len = RSTRING_LEN(name) - before_len;
1718
+ VALUE method_name = rb_str_substr(name, before_len, len);
1719
+ method_id = SYM2ID(rb_str_intern(method_name));
1720
+ } else {
1721
+ mod = rb_mKernel;
1722
+ method_id = SYM2ID(rb_str_intern(name));
1723
+ }
1724
+ }
1725
+ }
1726
+
1727
+ long len = p - json->memo;
1728
+ fbuffer_clear(&json->fbuffer);
1729
+ fbuffer_append(&json->fbuffer, json->memo, len);
1730
+ fbuffer_append_char(&json->fbuffer, '\0');
1731
+
1732
+ if (method_id) {
1733
+ VALUE text = rb_str_new2(FBUFFER_PTR(&json->fbuffer));
1734
+ *result = rb_funcallv(mod, method_id, 1, &text);
1735
+ } else {
1736
+ *result = DBL2NUM(rb_cstr_to_dbl(FBUFFER_PTR(&json->fbuffer), 1));
1737
+ }
1738
+
1739
+ return p + 1;
1740
+ } else {
1741
+ return NULL;
1742
+ }
1743
+ }
1744
+
1745
+
1746
+
1747
+ #line 1748 "parser.c"
1748
+ enum {JSON_array_start = 1};
1749
+ enum {JSON_array_first_final = 22};
1750
+ enum {JSON_array_error = 0};
1751
+
1752
+ enum {JSON_array_en_main = 1};
1753
+
1754
+
1755
+ #line 835 "parser.rl"
1756
+
1757
+
1758
+ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
1759
+ {
1760
+ int cs = EVIL;
1761
+
1762
+ if (json->max_nesting && current_nesting > json->max_nesting) {
1763
+ rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
1764
+ }
1765
+ long stack_head = json->stack->head;
1766
+
1767
+
1768
+ #line 1769 "parser.c"
1769
+ {
1770
+ cs = JSON_array_start;
1771
+ }
1772
+
1773
+ #line 847 "parser.rl"
1774
+
1775
+ #line 1776 "parser.c"
1776
+ {
1777
+ short _widec;
1778
+ if ( p == pe )
1779
+ goto _test_eof;
1780
+ switch ( cs )
1781
+ {
1782
+ case 1:
1783
+ if ( (*p) == 91 )
1784
+ goto st2;
1785
+ goto st0;
1786
+ st0:
1787
+ cs = 0;
1788
+ goto _out;
1789
+ st2:
1790
+ if ( ++p == pe )
1791
+ goto _test_eof2;
1792
+ case 2:
1793
+ switch( (*p) ) {
1794
+ case 13: goto st2;
1795
+ case 32: goto st2;
1796
+ case 34: goto tr2;
1797
+ case 45: goto tr2;
1798
+ case 47: goto st18;
1799
+ case 73: goto tr2;
1800
+ case 78: goto tr2;
1801
+ case 91: goto tr2;
1802
+ case 93: goto tr4;
1803
+ case 102: goto tr2;
1804
+ case 110: goto tr2;
1805
+ case 116: goto tr2;
1806
+ case 123: goto tr2;
1807
+ }
1808
+ if ( (*p) > 10 ) {
1809
+ if ( 48 <= (*p) && (*p) <= 57 )
1810
+ goto tr2;
1811
+ } else if ( (*p) >= 9 )
1812
+ goto st2;
1813
+ goto st0;
1814
+ tr2:
1815
+ #line 815 "parser.rl"
1816
+ {
1817
+ VALUE v = Qnil;
1818
+ char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
1819
+ if (np == NULL) {
1820
+ p--; {p++; cs = 3; goto _out;}
1821
+ } else {
1822
+ {p = (( np))-1;}
1823
+ }
1824
+ }
1825
+ goto st3;
1826
+ st3:
1827
+ if ( ++p == pe )
1828
+ goto _test_eof3;
1829
+ case 3:
1830
+ #line 1831 "parser.c"
1831
+ _widec = (*p);
1832
+ if ( 44 <= (*p) && (*p) <= 44 ) {
1833
+ _widec = (short)(128 + ((*p) - -128));
1834
+ if (
1835
+ #line 825 "parser.rl"
1836
+ json->allow_trailing_comma ) _widec += 256;
1837
+ }
1838
+ switch( _widec ) {
1839
+ case 13: goto st3;
1840
+ case 32: goto st3;
1841
+ case 47: goto st4;
1842
+ case 93: goto tr4;
1843
+ case 300: goto st8;
1844
+ case 556: goto st13;
1845
+ }
1846
+ if ( 9 <= _widec && _widec <= 10 )
1847
+ goto st3;
1848
+ goto st0;
1849
+ st4:
1850
+ if ( ++p == pe )
1851
+ goto _test_eof4;
1852
+ case 4:
1853
+ switch( (*p) ) {
1854
+ case 42: goto st5;
1855
+ case 47: goto st7;
1856
+ }
1857
+ goto st0;
1858
+ st5:
1859
+ if ( ++p == pe )
1860
+ goto _test_eof5;
1861
+ case 5:
1862
+ if ( (*p) == 42 )
1863
+ goto st6;
1864
+ goto st5;
1865
+ st6:
1866
+ if ( ++p == pe )
1867
+ goto _test_eof6;
1868
+ case 6:
1869
+ switch( (*p) ) {
1870
+ case 42: goto st6;
1871
+ case 47: goto st3;
1872
+ }
1873
+ goto st5;
1874
+ st7:
1875
+ if ( ++p == pe )
1876
+ goto _test_eof7;
1877
+ case 7:
1878
+ if ( (*p) == 10 )
1879
+ goto st3;
1880
+ goto st7;
1881
+ tr4:
1882
+ #line 827 "parser.rl"
1883
+ { p--; {p++; cs = 22; goto _out;} }
1884
+ goto st22;
1885
+ st22:
1886
+ if ( ++p == pe )
1887
+ goto _test_eof22;
1888
+ case 22:
1889
+ #line 1890 "parser.c"
1890
+ goto st0;
1891
+ st8:
1892
+ if ( ++p == pe )
1893
+ goto _test_eof8;
1894
+ case 8:
1895
+ switch( (*p) ) {
1896
+ case 13: goto st8;
1897
+ case 32: goto st8;
1898
+ case 34: goto tr2;
1899
+ case 45: goto tr2;
1900
+ case 47: goto st9;
1901
+ case 73: goto tr2;
1902
+ case 78: goto tr2;
1903
+ case 91: goto tr2;
1904
+ case 102: goto tr2;
1905
+ case 110: goto tr2;
1906
+ case 116: goto tr2;
1907
+ case 123: goto tr2;
1908
+ }
1909
+ if ( (*p) > 10 ) {
1910
+ if ( 48 <= (*p) && (*p) <= 57 )
1911
+ goto tr2;
1912
+ } else if ( (*p) >= 9 )
1913
+ goto st8;
1914
+ goto st0;
1915
+ st9:
1916
+ if ( ++p == pe )
1917
+ goto _test_eof9;
1918
+ case 9:
1919
+ switch( (*p) ) {
1920
+ case 42: goto st10;
1921
+ case 47: goto st12;
1922
+ }
1923
+ goto st0;
1924
+ st10:
1925
+ if ( ++p == pe )
1926
+ goto _test_eof10;
1927
+ case 10:
1928
+ if ( (*p) == 42 )
1929
+ goto st11;
1930
+ goto st10;
1931
+ st11:
1932
+ if ( ++p == pe )
1933
+ goto _test_eof11;
1934
+ case 11:
1935
+ switch( (*p) ) {
1936
+ case 42: goto st11;
1937
+ case 47: goto st8;
1938
+ }
1939
+ goto st10;
1940
+ st12:
1941
+ if ( ++p == pe )
1942
+ goto _test_eof12;
1943
+ case 12:
1944
+ if ( (*p) == 10 )
1945
+ goto st8;
1946
+ goto st12;
1947
+ st13:
1948
+ if ( ++p == pe )
1949
+ goto _test_eof13;
1950
+ case 13:
1951
+ _widec = (*p);
1952
+ if ( (*p) < 13 ) {
1953
+ if ( (*p) > 9 ) {
1954
+ if ( 10 <= (*p) && (*p) <= 10 ) {
1955
+ _widec = (short)(128 + ((*p) - -128));
1956
+ if (
1957
+ #line 825 "parser.rl"
1958
+ json->allow_trailing_comma ) _widec += 256;
1959
+ }
1960
+ } else if ( (*p) >= 9 ) {
1961
+ _widec = (short)(128 + ((*p) - -128));
1962
+ if (
1963
+ #line 825 "parser.rl"
1964
+ json->allow_trailing_comma ) _widec += 256;
1965
+ }
1966
+ } else if ( (*p) > 13 ) {
1967
+ if ( (*p) > 32 ) {
1968
+ if ( 47 <= (*p) && (*p) <= 47 ) {
1969
+ _widec = (short)(128 + ((*p) - -128));
1970
+ if (
1971
+ #line 825 "parser.rl"
1972
+ json->allow_trailing_comma ) _widec += 256;
1973
+ }
1974
+ } else if ( (*p) >= 32 ) {
1975
+ _widec = (short)(128 + ((*p) - -128));
1976
+ if (
1977
+ #line 825 "parser.rl"
1978
+ json->allow_trailing_comma ) _widec += 256;
1979
+ }
1980
+ } else {
1981
+ _widec = (short)(128 + ((*p) - -128));
1982
+ if (
1983
+ #line 825 "parser.rl"
1984
+ json->allow_trailing_comma ) _widec += 256;
1985
+ }
1986
+ switch( _widec ) {
1987
+ case 34: goto tr2;
1988
+ case 45: goto tr2;
1989
+ case 73: goto tr2;
1990
+ case 78: goto tr2;
1991
+ case 91: goto tr2;
1992
+ case 93: goto tr4;
1993
+ case 102: goto tr2;
1994
+ case 110: goto tr2;
1995
+ case 116: goto tr2;
1996
+ case 123: goto tr2;
1997
+ case 269: goto st8;
1998
+ case 288: goto st8;
1999
+ case 303: goto st9;
2000
+ case 525: goto st13;
2001
+ case 544: goto st13;
2002
+ case 559: goto st14;
2003
+ }
2004
+ if ( _widec < 265 ) {
2005
+ if ( 48 <= _widec && _widec <= 57 )
2006
+ goto tr2;
2007
+ } else if ( _widec > 266 ) {
2008
+ if ( 521 <= _widec && _widec <= 522 )
2009
+ goto st13;
2010
+ } else
2011
+ goto st8;
2012
+ goto st0;
2013
+ st14:
2014
+ if ( ++p == pe )
2015
+ goto _test_eof14;
2016
+ case 14:
2017
+ _widec = (*p);
2018
+ if ( (*p) > 42 ) {
2019
+ if ( 47 <= (*p) && (*p) <= 47 ) {
2020
+ _widec = (short)(128 + ((*p) - -128));
2021
+ if (
2022
+ #line 825 "parser.rl"
2023
+ json->allow_trailing_comma ) _widec += 256;
2024
+ }
2025
+ } else if ( (*p) >= 42 ) {
2026
+ _widec = (short)(128 + ((*p) - -128));
2027
+ if (
2028
+ #line 825 "parser.rl"
2029
+ json->allow_trailing_comma ) _widec += 256;
2030
+ }
2031
+ switch( _widec ) {
2032
+ case 298: goto st10;
2033
+ case 303: goto st12;
2034
+ case 554: goto st15;
2035
+ case 559: goto st17;
2036
+ }
2037
+ goto st0;
2038
+ st15:
2039
+ if ( ++p == pe )
2040
+ goto _test_eof15;
2041
+ case 15:
2042
+ _widec = (*p);
2043
+ if ( (*p) < 42 ) {
2044
+ if ( (*p) <= 41 ) {
2045
+ _widec = (short)(128 + ((*p) - -128));
2046
+ if (
2047
+ #line 825 "parser.rl"
2048
+ json->allow_trailing_comma ) _widec += 256;
2049
+ }
2050
+ } else if ( (*p) > 42 ) {
2051
+ if ( 43 <= (*p) )
2052
+ { _widec = (short)(128 + ((*p) - -128));
2053
+ if (
2054
+ #line 825 "parser.rl"
2055
+ json->allow_trailing_comma ) _widec += 256;
2056
+ }
2057
+ } else {
2058
+ _widec = (short)(128 + ((*p) - -128));
2059
+ if (
2060
+ #line 825 "parser.rl"
2061
+ json->allow_trailing_comma ) _widec += 256;
2062
+ }
2063
+ switch( _widec ) {
2064
+ case 298: goto st11;
2065
+ case 554: goto st16;
2066
+ }
2067
+ if ( _widec > 383 ) {
2068
+ if ( 384 <= _widec && _widec <= 639 )
2069
+ goto st15;
2070
+ } else if ( _widec >= 128 )
2071
+ goto st10;
2072
+ goto st0;
2073
+ st16:
2074
+ if ( ++p == pe )
2075
+ goto _test_eof16;
2076
+ case 16:
2077
+ _widec = (*p);
2078
+ if ( (*p) < 43 ) {
2079
+ if ( (*p) > 41 ) {
2080
+ if ( 42 <= (*p) && (*p) <= 42 ) {
2081
+ _widec = (short)(128 + ((*p) - -128));
2082
+ if (
2083
+ #line 825 "parser.rl"
2084
+ json->allow_trailing_comma ) _widec += 256;
2085
+ }
2086
+ } else {
2087
+ _widec = (short)(128 + ((*p) - -128));
2088
+ if (
2089
+ #line 825 "parser.rl"
2090
+ json->allow_trailing_comma ) _widec += 256;
2091
+ }
2092
+ } else if ( (*p) > 46 ) {
2093
+ if ( (*p) > 47 ) {
2094
+ if ( 48 <= (*p) )
2095
+ { _widec = (short)(128 + ((*p) - -128));
2096
+ if (
2097
+ #line 825 "parser.rl"
2098
+ json->allow_trailing_comma ) _widec += 256;
2099
+ }
2100
+ } else if ( (*p) >= 47 ) {
2101
+ _widec = (short)(128 + ((*p) - -128));
2102
+ if (
2103
+ #line 825 "parser.rl"
2104
+ json->allow_trailing_comma ) _widec += 256;
2105
+ }
2106
+ } else {
2107
+ _widec = (short)(128 + ((*p) - -128));
2108
+ if (
2109
+ #line 825 "parser.rl"
2110
+ json->allow_trailing_comma ) _widec += 256;
2111
+ }
2112
+ switch( _widec ) {
2113
+ case 298: goto st11;
2114
+ case 303: goto st8;
2115
+ case 554: goto st16;
2116
+ case 559: goto st13;
2117
+ }
2118
+ if ( _widec > 383 ) {
2119
+ if ( 384 <= _widec && _widec <= 639 )
2120
+ goto st15;
2121
+ } else if ( _widec >= 128 )
2122
+ goto st10;
2123
+ goto st0;
2124
+ st17:
2125
+ if ( ++p == pe )
2126
+ goto _test_eof17;
2127
+ case 17:
2128
+ _widec = (*p);
2129
+ if ( (*p) < 10 ) {
2130
+ if ( (*p) <= 9 ) {
2131
+ _widec = (short)(128 + ((*p) - -128));
2132
+ if (
2133
+ #line 825 "parser.rl"
2134
+ json->allow_trailing_comma ) _widec += 256;
2135
+ }
2136
+ } else if ( (*p) > 10 ) {
2137
+ if ( 11 <= (*p) )
2138
+ { _widec = (short)(128 + ((*p) - -128));
2139
+ if (
2140
+ #line 825 "parser.rl"
2141
+ json->allow_trailing_comma ) _widec += 256;
2142
+ }
2143
+ } else {
2144
+ _widec = (short)(128 + ((*p) - -128));
2145
+ if (
2146
+ #line 825 "parser.rl"
2147
+ json->allow_trailing_comma ) _widec += 256;
2148
+ }
2149
+ switch( _widec ) {
2150
+ case 266: goto st8;
2151
+ case 522: goto st13;
2152
+ }
2153
+ if ( _widec > 383 ) {
2154
+ if ( 384 <= _widec && _widec <= 639 )
2155
+ goto st17;
2156
+ } else if ( _widec >= 128 )
2157
+ goto st12;
2158
+ goto st0;
2159
+ st18:
2160
+ if ( ++p == pe )
2161
+ goto _test_eof18;
2162
+ case 18:
2163
+ switch( (*p) ) {
2164
+ case 42: goto st19;
2165
+ case 47: goto st21;
2166
+ }
2167
+ goto st0;
2168
+ st19:
2169
+ if ( ++p == pe )
2170
+ goto _test_eof19;
2171
+ case 19:
2172
+ if ( (*p) == 42 )
2173
+ goto st20;
2174
+ goto st19;
2175
+ st20:
2176
+ if ( ++p == pe )
2177
+ goto _test_eof20;
2178
+ case 20:
2179
+ switch( (*p) ) {
2180
+ case 42: goto st20;
2181
+ case 47: goto st2;
2182
+ }
2183
+ goto st19;
2184
+ st21:
2185
+ if ( ++p == pe )
2186
+ goto _test_eof21;
2187
+ case 21:
2188
+ if ( (*p) == 10 )
2189
+ goto st2;
2190
+ goto st21;
2191
+ }
2192
+ _test_eof2: cs = 2; goto _test_eof;
2193
+ _test_eof3: cs = 3; goto _test_eof;
2194
+ _test_eof4: cs = 4; goto _test_eof;
2195
+ _test_eof5: cs = 5; goto _test_eof;
2196
+ _test_eof6: cs = 6; goto _test_eof;
2197
+ _test_eof7: cs = 7; goto _test_eof;
2198
+ _test_eof22: cs = 22; goto _test_eof;
2199
+ _test_eof8: cs = 8; goto _test_eof;
2200
+ _test_eof9: cs = 9; goto _test_eof;
2201
+ _test_eof10: cs = 10; goto _test_eof;
2202
+ _test_eof11: cs = 11; goto _test_eof;
2203
+ _test_eof12: cs = 12; goto _test_eof;
2204
+ _test_eof13: cs = 13; goto _test_eof;
2205
+ _test_eof14: cs = 14; goto _test_eof;
2206
+ _test_eof15: cs = 15; goto _test_eof;
2207
+ _test_eof16: cs = 16; goto _test_eof;
2208
+ _test_eof17: cs = 17; goto _test_eof;
2209
+ _test_eof18: cs = 18; goto _test_eof;
2210
+ _test_eof19: cs = 19; goto _test_eof;
2211
+ _test_eof20: cs = 20; goto _test_eof;
2212
+ _test_eof21: cs = 21; goto _test_eof;
2213
+
2214
+ _test_eof: {}
2215
+ _out: {}
2216
+ }
2217
+
2218
+ #line 848 "parser.rl"
2219
+
2220
+ if(cs >= JSON_array_first_final) {
2221
+ long count = json->stack->head - stack_head;
2222
+
2223
+ if (RB_UNLIKELY(json->array_class)) {
2224
+ VALUE array = rb_class_new_instance(0, 0, json->array_class);
2225
+ VALUE *items = rvalue_stack_peek(json->stack, count);
2226
+ long index;
2227
+ for (index = 0; index < count; index++) {
2228
+ rb_funcall(array, i_leftshift, 1, items[index]);
2229
+ }
2230
+ *result = array;
2231
+ } else {
2232
+ VALUE array = rb_ary_new_from_values(count, rvalue_stack_peek(json->stack, count));
2233
+ *result = array;
2234
+ }
2235
+ rvalue_stack_pop(json->stack, count);
2236
+
2237
+ return p + 1;
2238
+ } else {
2239
+ raise_parse_error("unexpected token at '%s'", p);
2240
+ return NULL;
2241
+ }
2242
+ }
2243
+
2244
+ static inline VALUE build_string(const char *start, const char *end, bool intern, bool symbolize)
2245
+ {
2246
+ if (symbolize) {
2247
+ intern = true;
2248
+ }
2249
+ VALUE result;
2250
+ # ifdef HAVE_RB_ENC_INTERNED_STR
2251
+ if (intern) {
2252
+ result = rb_enc_interned_str(start, (long)(end - start), enc_utf8);
2253
+ } else {
2254
+ result = rb_utf8_str_new(start, (long)(end - start));
2255
+ }
2256
+ # else
2257
+ result = rb_utf8_str_new(start, (long)(end - start));
2258
+ if (intern) {
2259
+ result = rb_funcall(rb_str_freeze(result), i_uminus, 0);
2260
+ }
2261
+ # endif
2262
+
2263
+ if (symbolize) {
2264
+ result = rb_str_intern(result);
2265
+ }
2266
+
2267
+ return result;
2268
+ }
2269
+
2270
+ static VALUE json_string_fastpath(JSON_Parser *json, char *string, char *stringEnd, bool is_name, bool intern, bool symbolize)
2271
+ {
2272
+ size_t bufferSize = stringEnd - string;
2273
+
2274
+ if (is_name && json->in_array) {
2275
+ VALUE cached_key;
2276
+ if (RB_UNLIKELY(symbolize)) {
2277
+ cached_key = rsymbol_cache_fetch(&json->name_cache, string, bufferSize);
2278
+ } else {
2279
+ cached_key = rstring_cache_fetch(&json->name_cache, string, bufferSize);
2280
+ }
2281
+
2282
+ if (RB_LIKELY(cached_key)) {
2283
+ return cached_key;
2284
+ }
2285
+ }
2286
+
2287
+ return build_string(string, stringEnd, intern, symbolize);
2288
+ }
2289
+
2290
+ static VALUE json_string_unescape(JSON_Parser *json, char *string, char *stringEnd, bool is_name, bool intern, bool symbolize)
2291
+ {
2292
+ size_t bufferSize = stringEnd - string;
2293
+ char *p = string, *pe = string, *unescape, *bufferStart, *buffer;
2294
+ int unescape_len;
2295
+ char buf[4];
2296
+
2297
+ if (is_name && json->in_array) {
2298
+ VALUE cached_key;
2299
+ if (RB_UNLIKELY(symbolize)) {
2300
+ cached_key = rsymbol_cache_fetch(&json->name_cache, string, bufferSize);
2301
+ } else {
2302
+ cached_key = rstring_cache_fetch(&json->name_cache, string, bufferSize);
2303
+ }
2304
+
2305
+ if (RB_LIKELY(cached_key)) {
2306
+ return cached_key;
2307
+ }
2308
+ }
2309
+
2310
+ pe = memchr(p, '\\', bufferSize);
2311
+ if (RB_UNLIKELY(pe == NULL)) {
2312
+ return build_string(string, stringEnd, intern, symbolize);
2313
+ }
2314
+
2315
+ VALUE result = rb_str_buf_new(bufferSize);
2316
+ rb_enc_associate_index(result, utf8_encindex);
2317
+ buffer = bufferStart = RSTRING_PTR(result);
2318
+
2319
+ while (pe < stringEnd) {
2320
+ if (*pe == '\\') {
2321
+ unescape = (char *) "?";
2322
+ unescape_len = 1;
2323
+ if (pe > p) {
2324
+ MEMCPY(buffer, p, char, pe - p);
2325
+ buffer += pe - p;
2326
+ }
2327
+ switch (*++pe) {
2328
+ case 'n':
2329
+ unescape = (char *) "\n";
2330
+ break;
2331
+ case 'r':
2332
+ unescape = (char *) "\r";
2333
+ break;
2334
+ case 't':
2335
+ unescape = (char *) "\t";
2336
+ break;
2337
+ case '"':
2338
+ unescape = (char *) "\"";
2339
+ break;
2340
+ case '\\':
2341
+ unescape = (char *) "\\";
2342
+ break;
2343
+ case 'b':
2344
+ unescape = (char *) "\b";
2345
+ break;
2346
+ case 'f':
2347
+ unescape = (char *) "\f";
2348
+ break;
2349
+ case 'u':
2350
+ if (pe > stringEnd - 4) {
2351
+ raise_parse_error("incomplete unicode character escape sequence at '%s'", p);
2352
+ } else {
2353
+ uint32_t ch = unescape_unicode((unsigned char *) ++pe);
2354
+ pe += 3;
2355
+ /* To handle values above U+FFFF, we take a sequence of
2356
+ * \uXXXX escapes in the U+D800..U+DBFF then
2357
+ * U+DC00..U+DFFF ranges, take the low 10 bits from each
2358
+ * to make a 20-bit number, then add 0x10000 to get the
2359
+ * final codepoint.
2360
+ *
2361
+ * See Unicode 15: 3.8 "Surrogates", 5.3 "Handling
2362
+ * Surrogate Pairs in UTF-16", and 23.6 "Surrogates
2363
+ * Area".
2364
+ */
2365
+ if ((ch & 0xFC00) == 0xD800) {
2366
+ pe++;
2367
+ if (pe > stringEnd - 6) {
2368
+ raise_parse_error("incomplete surrogate pair at '%s'", p);
2369
+ }
2370
+ if (pe[0] == '\\' && pe[1] == 'u') {
2371
+ uint32_t sur = unescape_unicode((unsigned char *) pe + 2);
2372
+ ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16)
2373
+ | (sur & 0x3FF));
2374
+ pe += 5;
2375
+ } else {
2376
+ unescape = (char *) "?";
2377
+ break;
2378
+ }
2379
+ }
2380
+ unescape_len = convert_UTF32_to_UTF8(buf, ch);
2381
+ unescape = buf;
2382
+ }
2383
+ break;
2384
+ default:
2385
+ p = pe;
2386
+ continue;
2387
+ }
2388
+ MEMCPY(buffer, unescape, char, unescape_len);
2389
+ buffer += unescape_len;
2390
+ p = ++pe;
2391
+ } else {
2392
+ pe++;
2393
+ }
2394
+ }
2395
+
2396
+ if (pe > p) {
2397
+ MEMCPY(buffer, p, char, pe - p);
2398
+ buffer += pe - p;
2399
+ }
2400
+ rb_str_set_len(result, buffer - bufferStart);
2401
+
2402
+ if (symbolize) {
2403
+ result = rb_str_intern(result);
2404
+ } else if (intern) {
2405
+ result = rb_funcall(rb_str_freeze(result), i_uminus, 0);
2406
+ }
2407
+
2408
+ return result;
2409
+ }
2410
+
2411
+
2412
+ #line 2413 "parser.c"
2413
+ enum {JSON_string_start = 1};
2414
+ enum {JSON_string_first_final = 9};
2415
+ enum {JSON_string_error = 0};
2416
+
2417
+ enum {JSON_string_en_main = 1};
2418
+
2419
+
2420
+ #line 1071 "parser.rl"
2421
+
2422
+
2423
+ static int
2424
+ match_i(VALUE regexp, VALUE klass, VALUE memo)
2425
+ {
2426
+ if (regexp == Qundef) return ST_STOP;
2427
+ if (RTEST(rb_funcall(klass, i_json_creatable_p, 0)) &&
2428
+ RTEST(rb_funcall(regexp, i_match, 1, rb_ary_entry(memo, 0)))) {
2429
+ rb_ary_push(memo, klass);
2430
+ return ST_STOP;
2431
+ }
2432
+ return ST_CONTINUE;
2433
+ }
2434
+
2435
+ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result)
2436
+ {
2437
+ int cs = EVIL;
2438
+ VALUE match_string;
2439
+
2440
+
2441
+ #line 2442 "parser.c"
2442
+ {
2443
+ cs = JSON_string_start;
2444
+ }
2445
+
2446
+ #line 1091 "parser.rl"
2447
+ json->memo = p;
2448
+
2449
+ #line 2450 "parser.c"
2450
+ {
2451
+ if ( p == pe )
2452
+ goto _test_eof;
2453
+ switch ( cs )
2454
+ {
2455
+ case 1:
2456
+ if ( (*p) == 34 )
2457
+ goto st2;
2458
+ goto st0;
2459
+ st0:
2460
+ cs = 0;
2461
+ goto _out;
2462
+ st2:
2463
+ if ( ++p == pe )
2464
+ goto _test_eof2;
2465
+ case 2:
2466
+ switch( (*p) ) {
2467
+ case 34: goto tr2;
2468
+ case 92: goto st3;
2469
+ }
2470
+ if ( 0 <= (signed char)(*(p)) && (*(p)) <= 31 )
2471
+ goto st0;
2472
+ goto st2;
2473
+ tr2:
2474
+ #line 1053 "parser.rl"
2475
+ {
2476
+ *result = json_string_fastpath(json, json->memo + 1, p, json->parsing_name, json->parsing_name || json-> freeze, json->parsing_name && json->symbolize_names);
2477
+ {p = (( p + 1))-1;}
2478
+ p--;
2479
+ {p++; cs = 9; goto _out;}
2480
+ }
2481
+ #line 1046 "parser.rl"
2482
+ {
2483
+ *result = json_string_unescape(json, json->memo + 1, p, json->parsing_name, json->parsing_name || json-> freeze, json->parsing_name && json->symbolize_names);
2484
+ {p = (( p + 1))-1;}
2485
+ p--;
2486
+ {p++; cs = 9; goto _out;}
2487
+ }
2488
+ goto st9;
2489
+ tr6:
2490
+ #line 1046 "parser.rl"
2491
+ {
2492
+ *result = json_string_unescape(json, json->memo + 1, p, json->parsing_name, json->parsing_name || json-> freeze, json->parsing_name && json->symbolize_names);
2493
+ {p = (( p + 1))-1;}
2494
+ p--;
2495
+ {p++; cs = 9; goto _out;}
2496
+ }
2497
+ goto st9;
2498
+ st9:
2499
+ if ( ++p == pe )
2500
+ goto _test_eof9;
2501
+ case 9:
2502
+ #line 2503 "parser.c"
2503
+ goto st0;
2504
+ st3:
2505
+ if ( ++p == pe )
2506
+ goto _test_eof3;
2507
+ case 3:
2508
+ if ( (*p) == 117 )
2509
+ goto st5;
2510
+ if ( 0 <= (signed char)(*(p)) && (*(p)) <= 31 )
2511
+ goto st0;
2512
+ goto st4;
2513
+ st4:
2514
+ if ( ++p == pe )
2515
+ goto _test_eof4;
2516
+ case 4:
2517
+ switch( (*p) ) {
2518
+ case 34: goto tr6;
2519
+ case 92: goto st3;
2520
+ }
2521
+ if ( 0 <= (signed char)(*(p)) && (*(p)) <= 31 )
2522
+ goto st0;
2523
+ goto st4;
2524
+ st5:
2525
+ if ( ++p == pe )
2526
+ goto _test_eof5;
2527
+ case 5:
2528
+ if ( (*p) < 65 ) {
2529
+ if ( 48 <= (*p) && (*p) <= 57 )
2530
+ goto st6;
2531
+ } else if ( (*p) > 70 ) {
2532
+ if ( 97 <= (*p) && (*p) <= 102 )
2533
+ goto st6;
2534
+ } else
2535
+ goto st6;
2536
+ goto st0;
2537
+ st6:
2538
+ if ( ++p == pe )
2539
+ goto _test_eof6;
2540
+ case 6:
2541
+ if ( (*p) < 65 ) {
2542
+ if ( 48 <= (*p) && (*p) <= 57 )
2543
+ goto st7;
2544
+ } else if ( (*p) > 70 ) {
2545
+ if ( 97 <= (*p) && (*p) <= 102 )
2546
+ goto st7;
2547
+ } else
2548
+ goto st7;
2549
+ goto st0;
2550
+ st7:
2551
+ if ( ++p == pe )
2552
+ goto _test_eof7;
2553
+ case 7:
2554
+ if ( (*p) < 65 ) {
2555
+ if ( 48 <= (*p) && (*p) <= 57 )
2556
+ goto st8;
2557
+ } else if ( (*p) > 70 ) {
2558
+ if ( 97 <= (*p) && (*p) <= 102 )
2559
+ goto st8;
2560
+ } else
2561
+ goto st8;
2562
+ goto st0;
2563
+ st8:
2564
+ if ( ++p == pe )
2565
+ goto _test_eof8;
2566
+ case 8:
2567
+ if ( (*p) < 65 ) {
2568
+ if ( 48 <= (*p) && (*p) <= 57 )
2569
+ goto st4;
2570
+ } else if ( (*p) > 70 ) {
2571
+ if ( 97 <= (*p) && (*p) <= 102 )
2572
+ goto st4;
2573
+ } else
2574
+ goto st4;
2575
+ goto st0;
2576
+ }
2577
+ _test_eof2: cs = 2; goto _test_eof;
2578
+ _test_eof9: cs = 9; goto _test_eof;
2579
+ _test_eof3: cs = 3; goto _test_eof;
2580
+ _test_eof4: cs = 4; goto _test_eof;
2581
+ _test_eof5: cs = 5; goto _test_eof;
2582
+ _test_eof6: cs = 6; goto _test_eof;
2583
+ _test_eof7: cs = 7; goto _test_eof;
2584
+ _test_eof8: cs = 8; goto _test_eof;
2585
+
2586
+ _test_eof: {}
2587
+ _out: {}
2588
+ }
2589
+
2590
+ #line 1093 "parser.rl"
2591
+
2592
+ if (json->create_additions && RTEST(match_string = json->match_string)) {
2593
+ VALUE klass;
2594
+ VALUE memo = rb_ary_new2(2);
2595
+ rb_ary_push(memo, *result);
2596
+ rb_hash_foreach(match_string, match_i, memo);
2597
+ klass = rb_ary_entry(memo, 1);
2598
+ if (RTEST(klass)) {
2599
+ *result = rb_funcall(klass, i_json_create, 1, *result);
2600
+ }
2601
+ }
2602
+
2603
+ if (cs >= JSON_string_first_final) {
2604
+ return p + 1;
2605
+ } else {
2606
+ return NULL;
2607
+ }
2608
+ }
2609
+
2610
+ /*
2611
+ * Document-class: JSON::Ext::Parser
2612
+ *
2613
+ * This is the JSON parser implemented as a C extension. It can be configured
2614
+ * to be used by setting
2615
+ *
2616
+ * JSON.parser = JSON::Ext::Parser
2617
+ *
2618
+ * with the method parser= in JSON.
2619
+ *
2620
+ */
2621
+
2622
+ static VALUE convert_encoding(VALUE source)
2623
+ {
2624
+ int encindex = RB_ENCODING_GET(source);
2625
+
2626
+ if (RB_LIKELY(encindex == utf8_encindex)) {
2627
+ return source;
2628
+ }
2629
+
2630
+ if (encindex == binary_encindex) {
2631
+ // For historical reason, we silently reinterpret binary strings as UTF-8
2632
+ return rb_enc_associate_index(rb_str_dup(source), utf8_encindex);
2633
+ }
2634
+
2635
+ return rb_funcall(source, i_encode, 1, Encoding_UTF_8);
2636
+ }
2637
+
2638
+ static int configure_parser_i(VALUE key, VALUE val, VALUE data)
2639
+ {
2640
+ JSON_Parser *json = (JSON_Parser *)data;
2641
+
2642
+ if (key == sym_max_nesting) { json->max_nesting = RTEST(val) ? FIX2INT(val) : 0; }
2643
+ else if (key == sym_allow_nan) { json->allow_nan = RTEST(val); }
2644
+ else if (key == sym_allow_trailing_comma) { json->allow_trailing_comma = RTEST(val); }
2645
+ else if (key == sym_symbolize_names) { json->symbolize_names = RTEST(val); }
2646
+ else if (key == sym_freeze) { json->freeze = RTEST(val); }
2647
+ else if (key == sym_create_id) { json->create_id = RTEST(val) ? val : Qfalse; }
2648
+ else if (key == sym_object_class) { json->object_class = RTEST(val) ? val : Qfalse; }
2649
+ else if (key == sym_array_class) { json->array_class = RTEST(val) ? val : Qfalse; }
2650
+ else if (key == sym_decimal_class) { json->decimal_class = RTEST(val) ? val : Qfalse; }
2651
+ else if (key == sym_match_string) { json->match_string = RTEST(val) ? val : Qfalse; }
2652
+ else if (key == sym_create_additions) {
2653
+ if (NIL_P(val)) {
2654
+ json->create_additions = true;
2655
+ json->deprecated_create_additions = true;
2656
+ } else {
2657
+ json->create_additions = RTEST(val);
2658
+ json->deprecated_create_additions = false;
2659
+ }
2660
+ }
2661
+
2662
+ return ST_CONTINUE;
2663
+ }
2664
+
2665
+ static void parser_init(JSON_Parser *json, VALUE source, VALUE opts)
2666
+ {
2667
+ if (json->Vsource) {
2668
+ rb_raise(rb_eTypeError, "already initialized instance");
2669
+ }
2670
+
2671
+ json->fbuffer.initial_length = FBUFFER_INITIAL_LENGTH_DEFAULT;
2672
+ json->max_nesting = 100;
2673
+
2674
+ if (!NIL_P(opts)) {
2675
+ Check_Type(opts, T_HASH);
2676
+ if (RHASH_SIZE(opts) > 0) {
2677
+ // We assume in most cases few keys are set so it's faster to go over
2678
+ // the provided keys than to check all possible keys.
2679
+ rb_hash_foreach(opts, configure_parser_i, (VALUE)json);
2680
+
2681
+ if (json->symbolize_names && json->create_additions) {
2682
+ rb_raise(rb_eArgError,
2683
+ "options :symbolize_names and :create_additions cannot be "
2684
+ " used in conjunction");
2685
+ }
2686
+
2687
+ if (json->create_additions && !json->create_id) {
2688
+ json->create_id = rb_funcall(mJSON, i_create_id, 0);
2689
+ }
2690
+ }
2691
+
2692
+ }
2693
+ source = convert_encoding(StringValue(source));
2694
+ StringValue(source);
2695
+ json->len = RSTRING_LEN(source);
2696
+ json->source = RSTRING_PTR(source);
2697
+ json->Vsource = source;
2698
+ }
2699
+
2700
+ /*
2701
+ * call-seq: new(source, opts => {})
2702
+ *
2703
+ * Creates a new JSON::Ext::Parser instance for the string _source_.
2704
+ *
2705
+ * It will be configured by the _opts_ hash. _opts_ can have the following
2706
+ * keys:
2707
+ *
2708
+ * _opts_ can have the following keys:
2709
+ * * *max_nesting*: The maximum depth of nesting allowed in the parsed data
2710
+ * structures. Disable depth checking with :max_nesting => false|nil|0, it
2711
+ * defaults to 100.
2712
+ * * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
2713
+ * defiance of RFC 4627 to be parsed by the Parser. This option defaults to
2714
+ * false.
2715
+ * * *symbolize_names*: If set to true, returns symbols for the names
2716
+ * (keys) in a JSON object. Otherwise strings are returned, which is
2717
+ * also the default. It's not possible to use this option in
2718
+ * conjunction with the *create_additions* option.
2719
+ * * *create_additions*: If set to false, the Parser doesn't create
2720
+ * additions even if a matching class and create_id was found. This option
2721
+ * defaults to false.
2722
+ * * *object_class*: Defaults to Hash. If another type is provided, it will be used
2723
+ * instead of Hash to represent JSON objects. The type must respond to
2724
+ * +new+ without arguments, and return an object that respond to +[]=+.
2725
+ * * *array_class*: Defaults to Array If another type is provided, it will be used
2726
+ * instead of Hash to represent JSON arrays. The type must respond to
2727
+ * +new+ without arguments, and return an object that respond to +<<+.
2728
+ * * *decimal_class*: Specifies which class to use instead of the default
2729
+ * (Float) when parsing decimal numbers. This class must accept a single
2730
+ * string argument in its constructor.
2731
+ */
2732
+ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
2733
+ {
2734
+ GET_PARSER_INIT;
2735
+
2736
+ rb_check_arity(argc, 1, 2);
2737
+
2738
+ parser_init(json, argv[0], argc == 2 ? argv[1] : Qnil);
2739
+ return self;
2740
+ }
2741
+
2742
+
2743
+ #line 2744 "parser.c"
2744
+ enum {JSON_start = 1};
2745
+ enum {JSON_first_final = 10};
2746
+ enum {JSON_error = 0};
2747
+
2748
+ enum {JSON_en_main = 1};
2749
+
2750
+
2751
+ #line 1259 "parser.rl"
2752
+
2753
+
2754
+ /*
2755
+ * call-seq: parse()
2756
+ *
2757
+ * Parses the current JSON text _source_ and returns the complete data
2758
+ * structure as a result.
2759
+ * It raises JSON::ParserError if fail to parse.
2760
+ */
2761
+ static VALUE cParser_parse(VALUE self)
2762
+ {
2763
+ char *p, *pe;
2764
+ int cs = EVIL;
2765
+ VALUE result = Qnil;
2766
+ GET_PARSER;
2767
+
2768
+ char stack_buffer[FBUFFER_STACK_SIZE];
2769
+ fbuffer_stack_init(&json->fbuffer, FBUFFER_INITIAL_LENGTH_DEFAULT, stack_buffer, FBUFFER_STACK_SIZE);
2770
+
2771
+ VALUE rvalue_stack_buffer[RVALUE_STACK_INITIAL_CAPA];
2772
+ rvalue_stack stack = {
2773
+ .type = RVALUE_STACK_STACK_ALLOCATED,
2774
+ .ptr = rvalue_stack_buffer,
2775
+ .capa = RVALUE_STACK_INITIAL_CAPA,
2776
+ };
2777
+ json->stack = &stack;
2778
+
2779
+
2780
+ #line 2781 "parser.c"
2781
+ {
2782
+ cs = JSON_start;
2783
+ }
2784
+
2785
+ #line 1287 "parser.rl"
2786
+ p = json->source;
2787
+ pe = p + json->len;
2788
+
2789
+ #line 2790 "parser.c"
2790
+ {
2791
+ if ( p == pe )
2792
+ goto _test_eof;
2793
+ switch ( cs )
2794
+ {
2795
+ st1:
2796
+ if ( ++p == pe )
2797
+ goto _test_eof1;
2798
+ case 1:
2799
+ switch( (*p) ) {
2800
+ case 13: goto st1;
2801
+ case 32: goto st1;
2802
+ case 34: goto tr2;
2803
+ case 45: goto tr2;
2804
+ case 47: goto st6;
2805
+ case 73: goto tr2;
2806
+ case 78: goto tr2;
2807
+ case 91: goto tr2;
2808
+ case 102: goto tr2;
2809
+ case 110: goto tr2;
2810
+ case 116: goto tr2;
2811
+ case 123: goto tr2;
2812
+ }
2813
+ if ( (*p) > 10 ) {
2814
+ if ( 48 <= (*p) && (*p) <= 57 )
2815
+ goto tr2;
2816
+ } else if ( (*p) >= 9 )
2817
+ goto st1;
2818
+ goto st0;
2819
+ st0:
2820
+ cs = 0;
2821
+ goto _out;
2822
+ tr2:
2823
+ #line 1251 "parser.rl"
2824
+ {
2825
+ char *np = JSON_parse_value(json, p, pe, &result, 0);
2826
+ if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
2827
+ }
2828
+ goto st10;
2829
+ st10:
2830
+ if ( ++p == pe )
2831
+ goto _test_eof10;
2832
+ case 10:
2833
+ #line 2834 "parser.c"
2834
+ switch( (*p) ) {
2835
+ case 13: goto st10;
2836
+ case 32: goto st10;
2837
+ case 47: goto st2;
2838
+ }
2839
+ if ( 9 <= (*p) && (*p) <= 10 )
2840
+ goto st10;
2841
+ goto st0;
2842
+ st2:
2843
+ if ( ++p == pe )
2844
+ goto _test_eof2;
2845
+ case 2:
2846
+ switch( (*p) ) {
2847
+ case 42: goto st3;
2848
+ case 47: goto st5;
2849
+ }
2850
+ goto st0;
2851
+ st3:
2852
+ if ( ++p == pe )
2853
+ goto _test_eof3;
2854
+ case 3:
2855
+ if ( (*p) == 42 )
2856
+ goto st4;
2857
+ goto st3;
2858
+ st4:
2859
+ if ( ++p == pe )
2860
+ goto _test_eof4;
2861
+ case 4:
2862
+ switch( (*p) ) {
2863
+ case 42: goto st4;
2864
+ case 47: goto st10;
2865
+ }
2866
+ goto st3;
2867
+ st5:
2868
+ if ( ++p == pe )
2869
+ goto _test_eof5;
2870
+ case 5:
2871
+ if ( (*p) == 10 )
2872
+ goto st10;
2873
+ goto st5;
2874
+ st6:
2875
+ if ( ++p == pe )
2876
+ goto _test_eof6;
2877
+ case 6:
2878
+ switch( (*p) ) {
2879
+ case 42: goto st7;
2880
+ case 47: goto st9;
2881
+ }
2882
+ goto st0;
2883
+ st7:
2884
+ if ( ++p == pe )
2885
+ goto _test_eof7;
2886
+ case 7:
2887
+ if ( (*p) == 42 )
2888
+ goto st8;
2889
+ goto st7;
2890
+ st8:
2891
+ if ( ++p == pe )
2892
+ goto _test_eof8;
2893
+ case 8:
2894
+ switch( (*p) ) {
2895
+ case 42: goto st8;
2896
+ case 47: goto st1;
2897
+ }
2898
+ goto st7;
2899
+ st9:
2900
+ if ( ++p == pe )
2901
+ goto _test_eof9;
2902
+ case 9:
2903
+ if ( (*p) == 10 )
2904
+ goto st1;
2905
+ goto st9;
2906
+ }
2907
+ _test_eof1: cs = 1; goto _test_eof;
2908
+ _test_eof10: cs = 10; goto _test_eof;
2909
+ _test_eof2: cs = 2; goto _test_eof;
2910
+ _test_eof3: cs = 3; goto _test_eof;
2911
+ _test_eof4: cs = 4; goto _test_eof;
2912
+ _test_eof5: cs = 5; goto _test_eof;
2913
+ _test_eof6: cs = 6; goto _test_eof;
2914
+ _test_eof7: cs = 7; goto _test_eof;
2915
+ _test_eof8: cs = 8; goto _test_eof;
2916
+ _test_eof9: cs = 9; goto _test_eof;
2917
+
2918
+ _test_eof: {}
2919
+ _out: {}
2920
+ }
2921
+
2922
+ #line 1290 "parser.rl"
2923
+
2924
+ if (json->stack_handle) {
2925
+ rvalue_stack_eagerly_release(json->stack_handle);
2926
+ }
2927
+
2928
+ if (cs >= JSON_first_final && p == pe) {
2929
+ return result;
2930
+ } else {
2931
+ raise_parse_error("unexpected token at '%s'", p);
2932
+ return Qnil;
2933
+ }
2934
+ }
2935
+
2936
+ static VALUE cParser_m_parse(VALUE klass, VALUE source, VALUE opts)
2937
+ {
2938
+ char *p, *pe;
2939
+ int cs = EVIL;
2940
+ VALUE result = Qnil;
2941
+
2942
+ JSON_Parser _parser = {0};
2943
+ JSON_Parser *json = &_parser;
2944
+ parser_init(json, source, opts);
2945
+
2946
+ char stack_buffer[FBUFFER_STACK_SIZE];
2947
+ fbuffer_stack_init(&json->fbuffer, FBUFFER_INITIAL_LENGTH_DEFAULT, stack_buffer, FBUFFER_STACK_SIZE);
2948
+
2949
+ VALUE rvalue_stack_buffer[RVALUE_STACK_INITIAL_CAPA];
2950
+ rvalue_stack stack = {
2951
+ .type = RVALUE_STACK_STACK_ALLOCATED,
2952
+ .ptr = rvalue_stack_buffer,
2953
+ .capa = RVALUE_STACK_INITIAL_CAPA,
2954
+ };
2955
+ json->stack = &stack;
2956
+
2957
+
2958
+ #line 2959 "parser.c"
2959
+ {
2960
+ cs = JSON_start;
2961
+ }
2962
+
2963
+ #line 1325 "parser.rl"
2964
+ p = json->source;
2965
+ pe = p + json->len;
2966
+
2967
+ #line 2968 "parser.c"
2968
+ {
2969
+ if ( p == pe )
2970
+ goto _test_eof;
2971
+ switch ( cs )
2972
+ {
2973
+ st1:
2974
+ if ( ++p == pe )
2975
+ goto _test_eof1;
2976
+ case 1:
2977
+ switch( (*p) ) {
2978
+ case 13: goto st1;
2979
+ case 32: goto st1;
2980
+ case 34: goto tr2;
2981
+ case 45: goto tr2;
2982
+ case 47: goto st6;
2983
+ case 73: goto tr2;
2984
+ case 78: goto tr2;
2985
+ case 91: goto tr2;
2986
+ case 102: goto tr2;
2987
+ case 110: goto tr2;
2988
+ case 116: goto tr2;
2989
+ case 123: goto tr2;
2990
+ }
2991
+ if ( (*p) > 10 ) {
2992
+ if ( 48 <= (*p) && (*p) <= 57 )
2993
+ goto tr2;
2994
+ } else if ( (*p) >= 9 )
2995
+ goto st1;
2996
+ goto st0;
2997
+ st0:
2998
+ cs = 0;
2999
+ goto _out;
3000
+ tr2:
3001
+ #line 1251 "parser.rl"
3002
+ {
3003
+ char *np = JSON_parse_value(json, p, pe, &result, 0);
3004
+ if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
3005
+ }
3006
+ goto st10;
3007
+ st10:
3008
+ if ( ++p == pe )
3009
+ goto _test_eof10;
3010
+ case 10:
3011
+ #line 3012 "parser.c"
3012
+ switch( (*p) ) {
3013
+ case 13: goto st10;
3014
+ case 32: goto st10;
3015
+ case 47: goto st2;
3016
+ }
3017
+ if ( 9 <= (*p) && (*p) <= 10 )
3018
+ goto st10;
3019
+ goto st0;
3020
+ st2:
3021
+ if ( ++p == pe )
3022
+ goto _test_eof2;
3023
+ case 2:
3024
+ switch( (*p) ) {
3025
+ case 42: goto st3;
3026
+ case 47: goto st5;
3027
+ }
3028
+ goto st0;
3029
+ st3:
3030
+ if ( ++p == pe )
3031
+ goto _test_eof3;
3032
+ case 3:
3033
+ if ( (*p) == 42 )
3034
+ goto st4;
3035
+ goto st3;
3036
+ st4:
3037
+ if ( ++p == pe )
3038
+ goto _test_eof4;
3039
+ case 4:
3040
+ switch( (*p) ) {
3041
+ case 42: goto st4;
3042
+ case 47: goto st10;
3043
+ }
3044
+ goto st3;
3045
+ st5:
3046
+ if ( ++p == pe )
3047
+ goto _test_eof5;
3048
+ case 5:
3049
+ if ( (*p) == 10 )
3050
+ goto st10;
3051
+ goto st5;
3052
+ st6:
3053
+ if ( ++p == pe )
3054
+ goto _test_eof6;
3055
+ case 6:
3056
+ switch( (*p) ) {
3057
+ case 42: goto st7;
3058
+ case 47: goto st9;
3059
+ }
3060
+ goto st0;
3061
+ st7:
3062
+ if ( ++p == pe )
3063
+ goto _test_eof7;
3064
+ case 7:
3065
+ if ( (*p) == 42 )
3066
+ goto st8;
3067
+ goto st7;
3068
+ st8:
3069
+ if ( ++p == pe )
3070
+ goto _test_eof8;
3071
+ case 8:
3072
+ switch( (*p) ) {
3073
+ case 42: goto st8;
3074
+ case 47: goto st1;
3075
+ }
3076
+ goto st7;
3077
+ st9:
3078
+ if ( ++p == pe )
3079
+ goto _test_eof9;
3080
+ case 9:
3081
+ if ( (*p) == 10 )
3082
+ goto st1;
3083
+ goto st9;
3084
+ }
3085
+ _test_eof1: cs = 1; goto _test_eof;
3086
+ _test_eof10: cs = 10; goto _test_eof;
3087
+ _test_eof2: cs = 2; goto _test_eof;
3088
+ _test_eof3: cs = 3; goto _test_eof;
3089
+ _test_eof4: cs = 4; goto _test_eof;
3090
+ _test_eof5: cs = 5; goto _test_eof;
3091
+ _test_eof6: cs = 6; goto _test_eof;
3092
+ _test_eof7: cs = 7; goto _test_eof;
3093
+ _test_eof8: cs = 8; goto _test_eof;
3094
+ _test_eof9: cs = 9; goto _test_eof;
3095
+
3096
+ _test_eof: {}
3097
+ _out: {}
3098
+ }
3099
+
3100
+ #line 1328 "parser.rl"
3101
+
3102
+ if (json->stack_handle) {
3103
+ rvalue_stack_eagerly_release(json->stack_handle);
3104
+ }
3105
+
3106
+ if (cs >= JSON_first_final && p == pe) {
3107
+ return result;
3108
+ } else {
3109
+ raise_parse_error("unexpected token at '%s'", p);
3110
+ return Qnil;
3111
+ }
3112
+ }
3113
+
3114
+ static void JSON_mark(void *ptr)
3115
+ {
3116
+ JSON_Parser *json = ptr;
3117
+ rb_gc_mark(json->Vsource);
3118
+ rb_gc_mark(json->create_id);
3119
+ rb_gc_mark(json->object_class);
3120
+ rb_gc_mark(json->array_class);
3121
+ rb_gc_mark(json->decimal_class);
3122
+ rb_gc_mark(json->match_string);
3123
+ rb_gc_mark(json->stack_handle);
3124
+
3125
+ const VALUE *name_cache_entries = &json->name_cache.entries[0];
3126
+ rb_gc_mark_locations(name_cache_entries, name_cache_entries + json->name_cache.length);
3127
+ }
3128
+
3129
+ static void JSON_free(void *ptr)
3130
+ {
3131
+ JSON_Parser *json = ptr;
3132
+ fbuffer_free(&json->fbuffer);
3133
+ ruby_xfree(json);
3134
+ }
3135
+
3136
+ static size_t JSON_memsize(const void *ptr)
3137
+ {
3138
+ const JSON_Parser *json = ptr;
3139
+ return sizeof(*json) + FBUFFER_CAPA(&json->fbuffer);
3140
+ }
3141
+
3142
+ static const rb_data_type_t JSON_Parser_type = {
3143
+ "JSON/Parser",
3144
+ {JSON_mark, JSON_free, JSON_memsize,},
3145
+ 0, 0,
3146
+ RUBY_TYPED_FREE_IMMEDIATELY,
3147
+ };
3148
+
3149
+ static VALUE cJSON_parser_s_allocate(VALUE klass)
3150
+ {
3151
+ JSON_Parser *json;
3152
+ VALUE obj = TypedData_Make_Struct(klass, JSON_Parser, &JSON_Parser_type, json);
3153
+ fbuffer_stack_init(&json->fbuffer, 0, NULL, 0);
3154
+ return obj;
3155
+ }
3156
+
3157
+ /*
3158
+ * call-seq: source()
3159
+ *
3160
+ * Returns a copy of the current _source_ string, that was used to construct
3161
+ * this Parser.
3162
+ */
3163
+ static VALUE cParser_source(VALUE self)
3164
+ {
3165
+ GET_PARSER;
3166
+ return rb_str_dup(json->Vsource);
3167
+ }
3168
+
3169
+ void Init_parser(void)
3170
+ {
3171
+ #ifdef HAVE_RB_EXT_RACTOR_SAFE
3172
+ rb_ext_ractor_safe(true);
3173
+ #endif
3174
+
3175
+ #undef rb_intern
3176
+ rb_require("json/common");
3177
+ mJSON = rb_define_module("JSON");
3178
+ mExt = rb_define_module_under(mJSON, "Ext");
3179
+ cParser = rb_define_class_under(mExt, "Parser", rb_cObject);
3180
+ eNestingError = rb_path2class("JSON::NestingError");
3181
+ rb_gc_register_mark_object(eNestingError);
3182
+ rb_define_alloc_func(cParser, cJSON_parser_s_allocate);
3183
+ rb_define_method(cParser, "initialize", cParser_initialize, -1);
3184
+ rb_define_method(cParser, "parse", cParser_parse, 0);
3185
+ rb_define_method(cParser, "source", cParser_source, 0);
3186
+
3187
+ rb_define_singleton_method(cParser, "parse", cParser_m_parse, 2);
3188
+
3189
+ CNaN = rb_const_get(mJSON, rb_intern("NaN"));
3190
+ rb_gc_register_mark_object(CNaN);
3191
+
3192
+ CInfinity = rb_const_get(mJSON, rb_intern("Infinity"));
3193
+ rb_gc_register_mark_object(CInfinity);
3194
+
3195
+ CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity"));
3196
+ rb_gc_register_mark_object(CMinusInfinity);
3197
+
3198
+ rb_global_variable(&Encoding_UTF_8);
3199
+ Encoding_UTF_8 = rb_const_get(rb_path2class("Encoding"), rb_intern("UTF_8"));
3200
+
3201
+ sym_max_nesting = ID2SYM(rb_intern("max_nesting"));
3202
+ sym_allow_nan = ID2SYM(rb_intern("allow_nan"));
3203
+ sym_allow_trailing_comma = ID2SYM(rb_intern("allow_trailing_comma"));
3204
+ sym_symbolize_names = ID2SYM(rb_intern("symbolize_names"));
3205
+ sym_freeze = ID2SYM(rb_intern("freeze"));
3206
+ sym_create_additions = ID2SYM(rb_intern("create_additions"));
3207
+ sym_create_id = ID2SYM(rb_intern("create_id"));
3208
+ sym_object_class = ID2SYM(rb_intern("object_class"));
3209
+ sym_array_class = ID2SYM(rb_intern("array_class"));
3210
+ sym_decimal_class = ID2SYM(rb_intern("decimal_class"));
3211
+ sym_match_string = ID2SYM(rb_intern("match_string"));
3212
+
3213
+ i_create_id = rb_intern("create_id");
3214
+ i_json_creatable_p = rb_intern("json_creatable?");
3215
+ i_json_create = rb_intern("json_create");
3216
+ i_chr = rb_intern("chr");
3217
+ i_match = rb_intern("match");
3218
+ i_deep_const_get = rb_intern("deep_const_get");
3219
+ i_aset = rb_intern("[]=");
3220
+ i_aref = rb_intern("[]");
3221
+ i_leftshift = rb_intern("<<");
3222
+ i_new = rb_intern("new");
3223
+ i_try_convert = rb_intern("try_convert");
3224
+ i_uminus = rb_intern("-@");
3225
+ i_encode = rb_intern("encode");
3226
+
3227
+ binary_encindex = rb_ascii8bit_encindex();
3228
+ utf8_encindex = rb_utf8_encindex();
3229
+ enc_utf8 = rb_utf8_encoding();
3230
+ }
3231
+
3232
+ /*
3233
+ * Local variables:
3234
+ * mode: c
3235
+ * c-file-style: ruby
3236
+ * indent-tabs-mode: nil
3237
+ * End:
3238
+ */