cybrid_api_bank_ruby 0.126.55 → 0.126.56

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 (762) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +17 -10
  3. data/README.md +5 -5
  4. data/cybrid_api_bank_ruby.gemspec +1 -1
  5. data/lib/cybrid_api_bank_ruby/api/accounts_bank_api.rb +1 -1
  6. data/lib/cybrid_api_bank_ruby/api/assets_bank_api.rb +1 -1
  7. data/lib/cybrid_api_bank_ruby/api/banks_bank_api.rb +1 -1
  8. data/lib/cybrid_api_bank_ruby/api/counterparties_bank_api.rb +1 -1
  9. data/lib/cybrid_api_bank_ruby/api/customers_bank_api.rb +1 -1
  10. data/lib/cybrid_api_bank_ruby/api/deposit_addresses_bank_api.rb +1 -1
  11. data/lib/cybrid_api_bank_ruby/api/deposit_bank_accounts_bank_api.rb +1 -1
  12. data/lib/cybrid_api_bank_ruby/api/executions_bank_api.rb +1 -1
  13. data/lib/cybrid_api_bank_ruby/api/external_bank_accounts_bank_api.rb +1 -1
  14. data/lib/cybrid_api_bank_ruby/api/external_wallets_bank_api.rb +1 -1
  15. data/lib/cybrid_api_bank_ruby/api/files_bank_api.rb +1 -1
  16. data/lib/cybrid_api_bank_ruby/api/identity_verifications_bank_api.rb +1 -1
  17. data/lib/cybrid_api_bank_ruby/api/invoices_bank_api.rb +1 -1
  18. data/lib/cybrid_api_bank_ruby/api/payment_instructions_bank_api.rb +1 -1
  19. data/lib/cybrid_api_bank_ruby/api/persona_sessions_bank_api.rb +1 -1
  20. data/lib/cybrid_api_bank_ruby/api/plans_bank_api.rb +1 -1
  21. data/lib/cybrid_api_bank_ruby/api/prices_bank_api.rb +1 -1
  22. data/lib/cybrid_api_bank_ruby/api/quotes_bank_api.rb +1 -1
  23. data/lib/cybrid_api_bank_ruby/api/symbols_bank_api.rb +1 -1
  24. data/lib/cybrid_api_bank_ruby/api/trades_bank_api.rb +1 -1
  25. data/lib/cybrid_api_bank_ruby/api/transfers_bank_api.rb +1 -1
  26. data/lib/cybrid_api_bank_ruby/api/workflows_bank_api.rb +1 -1
  27. data/lib/cybrid_api_bank_ruby/api_client.rb +1 -1
  28. data/lib/cybrid_api_bank_ruby/api_error.rb +1 -1
  29. data/lib/cybrid_api_bank_ruby/configuration.rb +1 -1
  30. data/lib/cybrid_api_bank_ruby/models/account_association_bank_model.rb +1 -1
  31. data/lib/cybrid_api_bank_ruby/models/account_bank_model.rb +1 -1
  32. data/lib/cybrid_api_bank_ruby/models/account_list_bank_model.rb +1 -1
  33. data/lib/cybrid_api_bank_ruby/models/account_state_bank_model.rb +1 -1
  34. data/lib/cybrid_api_bank_ruby/models/account_type_bank_model.rb +1 -1
  35. data/lib/cybrid_api_bank_ruby/models/activity_limit_bank_model.rb +1 -1
  36. data/lib/cybrid_api_bank_ruby/models/activity_side_bank_model.rb +1 -1
  37. data/lib/cybrid_api_bank_ruby/models/activity_type_bank_model.rb +1 -1
  38. data/lib/cybrid_api_bank_ruby/models/asset_bank_model.rb +1 -1
  39. data/lib/cybrid_api_bank_ruby/models/asset_list_bank_model.rb +1 -1
  40. data/lib/cybrid_api_bank_ruby/models/asset_types_bank_model.rb +1 -1
  41. data/lib/cybrid_api_bank_ruby/models/bank_bank_model.rb +1 -1
  42. data/lib/cybrid_api_bank_ruby/models/bank_feature_bank_model.rb +1 -1
  43. data/lib/cybrid_api_bank_ruby/models/bank_list_bank_model.rb +1 -1
  44. data/lib/cybrid_api_bank_ruby/models/bank_supported_payout_symbols_inner_bank_model.rb +1 -1
  45. data/lib/cybrid_api_bank_ruby/models/bank_type_bank_model.rb +1 -1
  46. data/lib/cybrid_api_bank_ruby/models/compliance_check_bank_model.rb +1 -1
  47. data/lib/cybrid_api_bank_ruby/models/compliance_check_outcome_bank_model.rb +1 -1
  48. data/lib/cybrid_api_bank_ruby/models/compliance_check_type_bank_model.rb +1 -1
  49. data/lib/cybrid_api_bank_ruby/models/compliance_decision_bank_model.rb +1 -1
  50. data/lib/cybrid_api_bank_ruby/models/compliance_decision_state_bank_model.rb +1 -1
  51. data/lib/cybrid_api_bank_ruby/models/compliance_decision_type_bank_model.rb +1 -1
  52. data/lib/cybrid_api_bank_ruby/models/counterparty_address_bank_model.rb +1 -1
  53. data/lib/cybrid_api_bank_ruby/models/counterparty_aliases_inner_bank_model.rb +1 -1
  54. data/lib/cybrid_api_bank_ruby/models/counterparty_bank_model.rb +1 -1
  55. data/lib/cybrid_api_bank_ruby/models/counterparty_list_bank_model.rb +1 -1
  56. data/lib/cybrid_api_bank_ruby/models/counterparty_name_bank_model.rb +1 -1
  57. data/lib/cybrid_api_bank_ruby/models/counterparty_state_bank_model.rb +1 -1
  58. data/lib/cybrid_api_bank_ruby/models/counterparty_type_bank_model.rb +1 -1
  59. data/lib/cybrid_api_bank_ruby/models/customer_address_bank_model.rb +1 -1
  60. data/lib/cybrid_api_bank_ruby/models/customer_aliases_inner_bank_model.rb +1 -1
  61. data/lib/cybrid_api_bank_ruby/models/customer_bank_model.rb +1 -1
  62. data/lib/cybrid_api_bank_ruby/models/customer_list_bank_model.rb +1 -1
  63. data/lib/cybrid_api_bank_ruby/models/customer_name_bank_model.rb +1 -1
  64. data/lib/cybrid_api_bank_ruby/models/customer_state_bank_model.rb +1 -1
  65. data/lib/cybrid_api_bank_ruby/models/customer_type_bank_model.rb +1 -1
  66. data/lib/cybrid_api_bank_ruby/models/deposit_address_bank_model.rb +1 -1
  67. data/lib/cybrid_api_bank_ruby/models/deposit_address_format_bank_model.rb +1 -1
  68. data/lib/cybrid_api_bank_ruby/models/deposit_address_list_bank_model.rb +1 -1
  69. data/lib/cybrid_api_bank_ruby/models/deposit_address_state_bank_model.rb +1 -1
  70. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_account_details_inner_bank_model.rb +1 -1
  71. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_bank_model.rb +1 -1
  72. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_counterparty_address_bank_model.rb +1 -1
  73. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_list_bank_model.rb +1 -1
  74. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_routing_details_inner_bank_model.rb +1 -1
  75. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_routing_number_type_bank_model.rb +1 -1
  76. data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_state_bank_model.rb +1 -1
  77. data/lib/cybrid_api_bank_ruby/models/error_response_bank_model.rb +1 -1
  78. data/lib/cybrid_api_bank_ruby/models/execution_bank_model.rb +1 -1
  79. data/lib/cybrid_api_bank_ruby/models/execution_list_bank_model.rb +1 -1
  80. data/lib/cybrid_api_bank_ruby/models/execution_travel_rule_info_bank_model.rb +1 -1
  81. data/lib/cybrid_api_bank_ruby/models/external_bank_account_balances_bank_model.rb +1 -1
  82. data/lib/cybrid_api_bank_ruby/models/external_bank_account_bank_model.rb +1 -1
  83. data/lib/cybrid_api_bank_ruby/models/external_bank_account_kind_bank_model.rb +1 -1
  84. data/lib/cybrid_api_bank_ruby/models/external_bank_account_list_bank_model.rb +1 -1
  85. data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_addresses_inner_bank_model.rb +1 -1
  86. data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_bank_model.rb +1 -1
  87. data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_routing_details_inner_bank_model.rb +1 -1
  88. data/lib/cybrid_api_bank_ruby/models/external_bank_account_state_bank_model.rb +1 -1
  89. data/lib/cybrid_api_bank_ruby/models/external_wallet_bank_model.rb +1 -1
  90. data/lib/cybrid_api_bank_ruby/models/external_wallet_environment_bank_model.rb +1 -1
  91. data/lib/cybrid_api_bank_ruby/models/external_wallet_list_bank_model.rb +1 -1
  92. data/lib/cybrid_api_bank_ruby/models/external_wallet_state_bank_model.rb +1 -1
  93. data/lib/cybrid_api_bank_ruby/models/fee_association_bank_model.rb +1 -1
  94. data/lib/cybrid_api_bank_ruby/models/identification_number_bank_model.rb +1 -1
  95. data/lib/cybrid_api_bank_ruby/models/identity_verification_bank_model.rb +1 -1
  96. data/lib/cybrid_api_bank_ruby/models/identity_verification_business_associate_bank_model.rb +1 -1
  97. data/lib/cybrid_api_bank_ruby/models/identity_verification_document_bank_model.rb +1 -1
  98. data/lib/cybrid_api_bank_ruby/models/identity_verification_document_file_bank_model.rb +1 -1
  99. data/lib/cybrid_api_bank_ruby/models/identity_verification_list_bank_model.rb +1 -1
  100. data/lib/cybrid_api_bank_ruby/models/identity_verification_method_bank_model.rb +1 -1
  101. data/lib/cybrid_api_bank_ruby/models/identity_verification_options_bank_model.rb +1 -1
  102. data/lib/cybrid_api_bank_ruby/models/identity_verification_outcome_bank_model.rb +1 -1
  103. data/lib/cybrid_api_bank_ruby/models/identity_verification_persona_state_bank_model.rb +1 -1
  104. data/lib/cybrid_api_bank_ruby/models/identity_verification_state_bank_model.rb +1 -1
  105. data/lib/cybrid_api_bank_ruby/models/identity_verification_type_bank_model.rb +1 -1
  106. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_bank_model.rb +1 -1
  107. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_address_bank_model.rb +1 -1
  108. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_aliases_inner_bank_model.rb +1 -1
  109. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_bank_model.rb +1 -1
  110. data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_name_bank_model.rb +1 -1
  111. data/lib/cybrid_api_bank_ruby/models/invoice_bank_model.rb +1 -1
  112. data/lib/cybrid_api_bank_ruby/models/invoice_list_bank_model.rb +1 -1
  113. data/lib/cybrid_api_bank_ruby/models/patch_bank_bank_model.rb +1 -1
  114. data/lib/cybrid_api_bank_ruby/models/patch_customer_bank_model.rb +1 -1
  115. data/lib/cybrid_api_bank_ruby/models/patch_external_bank_account_bank_model.rb +1 -1
  116. data/lib/cybrid_api_bank_ruby/models/patch_transfer_bank_model.rb +1 -1
  117. data/lib/cybrid_api_bank_ruby/models/patch_transfer_participant_bank_model.rb +1 -1
  118. data/lib/cybrid_api_bank_ruby/models/payment_instruction_bank_model.rb +1 -1
  119. data/lib/cybrid_api_bank_ruby/models/payment_instruction_list_bank_model.rb +1 -1
  120. data/lib/cybrid_api_bank_ruby/models/persona_session_bank_model.rb +1 -1
  121. data/lib/cybrid_api_bank_ruby/models/plan_bank_model.rb +1 -1
  122. data/lib/cybrid_api_bank_ruby/models/plan_list_bank_model.rb +1 -1
  123. data/lib/cybrid_api_bank_ruby/models/plan_travel_rule_info_bank_model.rb +1 -1
  124. data/lib/cybrid_api_bank_ruby/models/platform_file_bank_model.rb +1 -1
  125. data/lib/cybrid_api_bank_ruby/models/platform_file_list_bank_model.rb +1 -1
  126. data/lib/cybrid_api_bank_ruby/models/post_account_bank_model.rb +1 -1
  127. data/lib/cybrid_api_bank_ruby/models/post_bank_account_details_bank_model.rb +1 -1
  128. data/lib/cybrid_api_bank_ruby/models/post_bank_bank_model.rb +1 -1
  129. data/lib/cybrid_api_bank_ruby/models/post_counterparty_address_bank_model.rb +1 -1
  130. data/lib/cybrid_api_bank_ruby/models/post_counterparty_aliases_inner_bank_model.rb +1 -1
  131. data/lib/cybrid_api_bank_ruby/models/post_counterparty_bank_model.rb +1 -1
  132. data/lib/cybrid_api_bank_ruby/models/post_counterparty_name_bank_model.rb +1 -1
  133. data/lib/cybrid_api_bank_ruby/models/post_customer_address_bank_model.rb +1 -1
  134. data/lib/cybrid_api_bank_ruby/models/post_customer_aliases_inner_bank_model.rb +1 -1
  135. data/lib/cybrid_api_bank_ruby/models/post_customer_bank_model.rb +1 -1
  136. data/lib/cybrid_api_bank_ruby/models/post_customer_name_bank_model.rb +1 -1
  137. data/lib/cybrid_api_bank_ruby/models/post_deposit_address_bank_model.rb +1 -1
  138. data/lib/cybrid_api_bank_ruby/models/post_deposit_bank_account_bank_model.rb +1 -1
  139. data/lib/cybrid_api_bank_ruby/models/post_execution_bank_model.rb +1 -1
  140. data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_bank_model.rb +1 -1
  141. data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_address_bank_model.rb +1 -1
  142. data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_name_bank_model.rb +1 -1
  143. data/lib/cybrid_api_bank_ruby/models/post_external_wallet_bank_model.rb +1 -1
  144. data/lib/cybrid_api_bank_ruby/models/post_fee_bank_model.rb +1 -1
  145. data/lib/cybrid_api_bank_ruby/models/post_file_bank_model.rb +1 -1
  146. data/lib/cybrid_api_bank_ruby/models/post_identification_number_bank_model.rb +1 -1
  147. data/lib/cybrid_api_bank_ruby/models/post_identity_verification_address_bank_model.rb +1 -1
  148. data/lib/cybrid_api_bank_ruby/models/post_identity_verification_aliases_inner_bank_model.rb +1 -1
  149. data/lib/cybrid_api_bank_ruby/models/post_identity_verification_bank_model.rb +1 -1
  150. data/lib/cybrid_api_bank_ruby/models/post_identity_verification_name_bank_model.rb +1 -1
  151. data/lib/cybrid_api_bank_ruby/models/post_invoice_bank_model.rb +1 -1
  152. data/lib/cybrid_api_bank_ruby/models/post_payment_instruction_bank_model.rb +1 -1
  153. data/lib/cybrid_api_bank_ruby/models/post_persona_session_bank_model.rb +1 -1
  154. data/lib/cybrid_api_bank_ruby/models/post_plan_bank_model.rb +1 -1
  155. data/lib/cybrid_api_bank_ruby/models/post_plan_destination_account_bank_model.rb +1 -1
  156. data/lib/cybrid_api_bank_ruby/models/post_plan_source_account_bank_model.rb +1 -1
  157. data/lib/cybrid_api_bank_ruby/models/post_plan_travel_rule_info_bank_model.rb +1 -1
  158. data/lib/cybrid_api_bank_ruby/models/post_quote_bank_model.rb +1 -1
  159. data/lib/cybrid_api_bank_ruby/models/post_quote_entry_bank_model.rb +1 -1
  160. data/lib/cybrid_api_bank_ruby/models/post_supported_payout_symbols_bank_model.rb +1 -1
  161. data/lib/cybrid_api_bank_ruby/models/post_trade_bank_model.rb +1 -1
  162. data/lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb +1 -1
  163. data/lib/cybrid_api_bank_ruby/models/post_transfer_participant_bank_model.rb +1 -1
  164. data/lib/cybrid_api_bank_ruby/models/post_ultimate_beneficial_owner_bank_model.rb +1 -1
  165. data/lib/cybrid_api_bank_ruby/models/post_workflow_bank_model.rb +1 -1
  166. data/lib/cybrid_api_bank_ruby/models/quote_bank_model.rb +1 -1
  167. data/lib/cybrid_api_bank_ruby/models/quote_entry_bank_model.rb +1 -1
  168. data/lib/cybrid_api_bank_ruby/models/quote_entry_destination_account_bank_model.rb +1 -1
  169. data/lib/cybrid_api_bank_ruby/models/quote_entry_source_account_bank_model.rb +1 -1
  170. data/lib/cybrid_api_bank_ruby/models/quote_list_bank_model.rb +1 -1
  171. data/lib/cybrid_api_bank_ruby/models/quote_side_bank_model.rb +1 -1
  172. data/lib/cybrid_api_bank_ruby/models/quote_type_bank_model.rb +1 -1
  173. data/lib/cybrid_api_bank_ruby/models/stage_bank_model.rb +1 -1
  174. data/lib/cybrid_api_bank_ruby/models/symbol_price_bank_model.rb +1 -1
  175. data/lib/cybrid_api_bank_ruby/models/trade_bank_model.rb +1 -1
  176. data/lib/cybrid_api_bank_ruby/models/trade_failure_code_bank_model.rb +1 -1
  177. data/lib/cybrid_api_bank_ruby/models/trade_list_bank_model.rb +1 -1
  178. data/lib/cybrid_api_bank_ruby/models/trade_side_bank_model.rb +1 -1
  179. data/lib/cybrid_api_bank_ruby/models/trade_state_bank_model.rb +1 -1
  180. data/lib/cybrid_api_bank_ruby/models/trade_type_bank_model.rb +1 -1
  181. data/lib/cybrid_api_bank_ruby/models/transfer_account_type_bank_model.rb +1 -1
  182. data/lib/cybrid_api_bank_ruby/models/transfer_bank_model.rb +1 -1
  183. data/lib/cybrid_api_bank_ruby/models/transfer_destination_account_bank_model.rb +1 -1
  184. data/lib/cybrid_api_bank_ruby/models/transfer_entry_bank_model.rb +1 -1
  185. data/lib/cybrid_api_bank_ruby/models/transfer_entry_destination_account_bank_model.rb +1 -1
  186. data/lib/cybrid_api_bank_ruby/models/transfer_failure_code_bank_model.rb +1 -1
  187. data/lib/cybrid_api_bank_ruby/models/transfer_hold_details_bank_model.rb +1 -1
  188. data/lib/cybrid_api_bank_ruby/models/transfer_identifiers_inner_bank_model.rb +1 -1
  189. data/lib/cybrid_api_bank_ruby/models/transfer_list_bank_model.rb +1 -1
  190. data/lib/cybrid_api_bank_ruby/models/transfer_participant_bank_model.rb +1 -1
  191. data/lib/cybrid_api_bank_ruby/models/transfer_side_bank_model.rb +1 -1
  192. data/lib/cybrid_api_bank_ruby/models/transfer_source_account_bank_model.rb +1 -1
  193. data/lib/cybrid_api_bank_ruby/models/transfer_state_bank_model.rb +1 -1
  194. data/lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb +1 -1
  195. data/lib/cybrid_api_bank_ruby/models/travel_rule_info_party_bank_model.rb +1 -1
  196. data/lib/cybrid_api_bank_ruby/models/workflow_bank_model.rb +1 -1
  197. data/lib/cybrid_api_bank_ruby/models/workflow_state_bank_model.rb +1 -1
  198. data/lib/cybrid_api_bank_ruby/models/workflow_type_bank_model.rb +1 -1
  199. data/lib/cybrid_api_bank_ruby/models/workflow_with_details_all_of_bank_model.rb +1 -1
  200. data/lib/cybrid_api_bank_ruby/models/workflow_with_details_bank_model.rb +1 -1
  201. data/lib/cybrid_api_bank_ruby/models/workflows_list_bank_model.rb +1 -1
  202. data/lib/cybrid_api_bank_ruby/version.rb +2 -2
  203. data/lib/cybrid_api_bank_ruby.rb +1 -1
  204. data/spec/api/accounts_bank_api_spec.rb +1 -1
  205. data/spec/api/assets_bank_api_spec.rb +1 -1
  206. data/spec/api/banks_bank_api_spec.rb +1 -1
  207. data/spec/api/counterparties_bank_api_spec.rb +1 -1
  208. data/spec/api/customers_bank_api_spec.rb +1 -1
  209. data/spec/api/deposit_addresses_bank_api_spec.rb +1 -1
  210. data/spec/api/deposit_bank_accounts_bank_api_spec.rb +1 -1
  211. data/spec/api/executions_bank_api_spec.rb +1 -1
  212. data/spec/api/external_bank_accounts_bank_api_spec.rb +1 -1
  213. data/spec/api/external_wallets_bank_api_spec.rb +1 -1
  214. data/spec/api/files_bank_api_spec.rb +1 -1
  215. data/spec/api/identity_verifications_bank_api_spec.rb +1 -1
  216. data/spec/api/invoices_bank_api_spec.rb +1 -1
  217. data/spec/api/payment_instructions_bank_api_spec.rb +1 -1
  218. data/spec/api/persona_sessions_bank_api_spec.rb +1 -1
  219. data/spec/api/plans_bank_api_spec.rb +1 -1
  220. data/spec/api/prices_bank_api_spec.rb +1 -1
  221. data/spec/api/quotes_bank_api_spec.rb +1 -1
  222. data/spec/api/symbols_bank_api_spec.rb +1 -1
  223. data/spec/api/trades_bank_api_spec.rb +1 -1
  224. data/spec/api/transfers_bank_api_spec.rb +1 -1
  225. data/spec/api/workflows_bank_api_spec.rb +1 -1
  226. data/spec/api_client_spec.rb +1 -1
  227. data/spec/configuration_spec.rb +1 -1
  228. data/spec/models/account_association_bank_model_spec.rb +1 -1
  229. data/spec/models/account_bank_model_spec.rb +1 -1
  230. data/spec/models/account_list_bank_model_spec.rb +1 -1
  231. data/spec/models/account_state_bank_model_spec.rb +1 -1
  232. data/spec/models/account_type_bank_model_spec.rb +1 -1
  233. data/spec/models/activity_limit_bank_model_spec.rb +1 -1
  234. data/spec/models/activity_side_bank_model_spec.rb +1 -1
  235. data/spec/models/activity_type_bank_model_spec.rb +1 -1
  236. data/spec/models/asset_bank_model_spec.rb +1 -1
  237. data/spec/models/asset_list_bank_model_spec.rb +1 -1
  238. data/spec/models/asset_types_bank_model_spec.rb +1 -1
  239. data/spec/models/bank_bank_model_spec.rb +1 -1
  240. data/spec/models/bank_feature_bank_model_spec.rb +1 -1
  241. data/spec/models/bank_list_bank_model_spec.rb +1 -1
  242. data/spec/models/bank_supported_payout_symbols_inner_bank_model_spec.rb +1 -1
  243. data/spec/models/bank_type_bank_model_spec.rb +1 -1
  244. data/spec/models/compliance_check_bank_model_spec.rb +1 -1
  245. data/spec/models/compliance_check_outcome_bank_model_spec.rb +1 -1
  246. data/spec/models/compliance_check_type_bank_model_spec.rb +1 -1
  247. data/spec/models/compliance_decision_bank_model_spec.rb +1 -1
  248. data/spec/models/compliance_decision_state_bank_model_spec.rb +1 -1
  249. data/spec/models/compliance_decision_type_bank_model_spec.rb +1 -1
  250. data/spec/models/counterparty_address_bank_model_spec.rb +1 -1
  251. data/spec/models/counterparty_aliases_inner_bank_model_spec.rb +1 -1
  252. data/spec/models/counterparty_bank_model_spec.rb +1 -1
  253. data/spec/models/counterparty_list_bank_model_spec.rb +1 -1
  254. data/spec/models/counterparty_name_bank_model_spec.rb +1 -1
  255. data/spec/models/counterparty_state_bank_model_spec.rb +1 -1
  256. data/spec/models/counterparty_type_bank_model_spec.rb +1 -1
  257. data/spec/models/customer_address_bank_model_spec.rb +1 -1
  258. data/spec/models/customer_aliases_inner_bank_model_spec.rb +1 -1
  259. data/spec/models/customer_bank_model_spec.rb +1 -1
  260. data/spec/models/customer_list_bank_model_spec.rb +1 -1
  261. data/spec/models/customer_name_bank_model_spec.rb +1 -1
  262. data/spec/models/customer_state_bank_model_spec.rb +1 -1
  263. data/spec/models/customer_type_bank_model_spec.rb +1 -1
  264. data/spec/models/deposit_address_bank_model_spec.rb +1 -1
  265. data/spec/models/deposit_address_format_bank_model_spec.rb +1 -1
  266. data/spec/models/deposit_address_list_bank_model_spec.rb +1 -1
  267. data/spec/models/deposit_address_state_bank_model_spec.rb +1 -1
  268. data/spec/models/deposit_bank_account_account_details_inner_bank_model_spec.rb +1 -1
  269. data/spec/models/deposit_bank_account_bank_model_spec.rb +1 -1
  270. data/spec/models/deposit_bank_account_counterparty_address_bank_model_spec.rb +1 -1
  271. data/spec/models/deposit_bank_account_list_bank_model_spec.rb +1 -1
  272. data/spec/models/deposit_bank_account_routing_details_inner_bank_model_spec.rb +1 -1
  273. data/spec/models/deposit_bank_account_routing_number_type_bank_model_spec.rb +1 -1
  274. data/spec/models/deposit_bank_account_state_bank_model_spec.rb +1 -1
  275. data/spec/models/error_response_bank_model_spec.rb +1 -1
  276. data/spec/models/execution_bank_model_spec.rb +1 -1
  277. data/spec/models/execution_list_bank_model_spec.rb +1 -1
  278. data/spec/models/execution_travel_rule_info_bank_model_spec.rb +1 -1
  279. data/spec/models/external_bank_account_balances_bank_model_spec.rb +1 -1
  280. data/spec/models/external_bank_account_bank_model_spec.rb +1 -1
  281. data/spec/models/external_bank_account_kind_bank_model_spec.rb +1 -1
  282. data/spec/models/external_bank_account_list_bank_model_spec.rb +1 -1
  283. data/spec/models/external_bank_account_pii_inner_addresses_inner_bank_model_spec.rb +1 -1
  284. data/spec/models/external_bank_account_pii_inner_bank_model_spec.rb +1 -1
  285. data/spec/models/external_bank_account_pii_inner_routing_details_inner_bank_model_spec.rb +1 -1
  286. data/spec/models/external_bank_account_state_bank_model_spec.rb +1 -1
  287. data/spec/models/external_wallet_bank_model_spec.rb +1 -1
  288. data/spec/models/external_wallet_environment_bank_model_spec.rb +1 -1
  289. data/spec/models/external_wallet_list_bank_model_spec.rb +1 -1
  290. data/spec/models/external_wallet_state_bank_model_spec.rb +1 -1
  291. data/spec/models/fee_association_bank_model_spec.rb +1 -1
  292. data/spec/models/identification_number_bank_model_spec.rb +1 -1
  293. data/spec/models/identity_verification_bank_model_spec.rb +1 -1
  294. data/spec/models/identity_verification_business_associate_bank_model_spec.rb +1 -1
  295. data/spec/models/identity_verification_document_bank_model_spec.rb +1 -1
  296. data/spec/models/identity_verification_document_file_bank_model_spec.rb +1 -1
  297. data/spec/models/identity_verification_list_bank_model_spec.rb +1 -1
  298. data/spec/models/identity_verification_method_bank_model_spec.rb +1 -1
  299. data/spec/models/identity_verification_options_bank_model_spec.rb +1 -1
  300. data/spec/models/identity_verification_outcome_bank_model_spec.rb +1 -1
  301. data/spec/models/identity_verification_persona_state_bank_model_spec.rb +1 -1
  302. data/spec/models/identity_verification_state_bank_model_spec.rb +1 -1
  303. data/spec/models/identity_verification_type_bank_model_spec.rb +1 -1
  304. data/spec/models/identity_verification_with_details_bank_model_spec.rb +1 -1
  305. data/spec/models/identity_verification_with_details_pii_address_bank_model_spec.rb +1 -1
  306. data/spec/models/identity_verification_with_details_pii_aliases_inner_bank_model_spec.rb +1 -1
  307. data/spec/models/identity_verification_with_details_pii_bank_model_spec.rb +1 -1
  308. data/spec/models/identity_verification_with_details_pii_name_bank_model_spec.rb +1 -1
  309. data/spec/models/invoice_bank_model_spec.rb +1 -1
  310. data/spec/models/invoice_list_bank_model_spec.rb +1 -1
  311. data/spec/models/patch_bank_bank_model_spec.rb +1 -1
  312. data/spec/models/patch_customer_bank_model_spec.rb +1 -1
  313. data/spec/models/patch_external_bank_account_bank_model_spec.rb +1 -1
  314. data/spec/models/patch_transfer_bank_model_spec.rb +1 -1
  315. data/spec/models/patch_transfer_participant_bank_model_spec.rb +1 -1
  316. data/spec/models/payment_instruction_bank_model_spec.rb +1 -1
  317. data/spec/models/payment_instruction_list_bank_model_spec.rb +1 -1
  318. data/spec/models/persona_session_bank_model_spec.rb +1 -1
  319. data/spec/models/plan_bank_model_spec.rb +1 -1
  320. data/spec/models/plan_list_bank_model_spec.rb +1 -1
  321. data/spec/models/plan_travel_rule_info_bank_model_spec.rb +1 -1
  322. data/spec/models/platform_file_bank_model_spec.rb +1 -1
  323. data/spec/models/platform_file_list_bank_model_spec.rb +1 -1
  324. data/spec/models/post_account_bank_model_spec.rb +1 -1
  325. data/spec/models/post_bank_account_details_bank_model_spec.rb +1 -1
  326. data/spec/models/post_bank_bank_model_spec.rb +1 -1
  327. data/spec/models/post_counterparty_address_bank_model_spec.rb +1 -1
  328. data/spec/models/post_counterparty_aliases_inner_bank_model_spec.rb +1 -1
  329. data/spec/models/post_counterparty_bank_model_spec.rb +1 -1
  330. data/spec/models/post_counterparty_name_bank_model_spec.rb +1 -1
  331. data/spec/models/post_customer_address_bank_model_spec.rb +1 -1
  332. data/spec/models/post_customer_aliases_inner_bank_model_spec.rb +1 -1
  333. data/spec/models/post_customer_bank_model_spec.rb +1 -1
  334. data/spec/models/post_customer_name_bank_model_spec.rb +1 -1
  335. data/spec/models/post_deposit_address_bank_model_spec.rb +1 -1
  336. data/spec/models/post_deposit_bank_account_bank_model_spec.rb +1 -1
  337. data/spec/models/post_execution_bank_model_spec.rb +1 -1
  338. data/spec/models/post_external_bank_account_bank_model_spec.rb +1 -1
  339. data/spec/models/post_external_bank_account_counterparty_address_bank_model_spec.rb +1 -1
  340. data/spec/models/post_external_bank_account_counterparty_name_bank_model_spec.rb +1 -1
  341. data/spec/models/post_external_wallet_bank_model_spec.rb +1 -1
  342. data/spec/models/post_fee_bank_model_spec.rb +1 -1
  343. data/spec/models/post_file_bank_model_spec.rb +1 -1
  344. data/spec/models/post_identification_number_bank_model_spec.rb +1 -1
  345. data/spec/models/post_identity_verification_address_bank_model_spec.rb +1 -1
  346. data/spec/models/post_identity_verification_aliases_inner_bank_model_spec.rb +1 -1
  347. data/spec/models/post_identity_verification_bank_model_spec.rb +1 -1
  348. data/spec/models/post_identity_verification_name_bank_model_spec.rb +1 -1
  349. data/spec/models/post_invoice_bank_model_spec.rb +1 -1
  350. data/spec/models/post_payment_instruction_bank_model_spec.rb +1 -1
  351. data/spec/models/post_persona_session_bank_model_spec.rb +1 -1
  352. data/spec/models/post_plan_bank_model_spec.rb +1 -1
  353. data/spec/models/post_plan_destination_account_bank_model_spec.rb +1 -1
  354. data/spec/models/post_plan_source_account_bank_model_spec.rb +1 -1
  355. data/spec/models/post_plan_travel_rule_info_bank_model_spec.rb +1 -1
  356. data/spec/models/post_quote_bank_model_spec.rb +1 -1
  357. data/spec/models/post_quote_entry_bank_model_spec.rb +1 -1
  358. data/spec/models/post_supported_payout_symbols_bank_model_spec.rb +1 -1
  359. data/spec/models/post_trade_bank_model_spec.rb +1 -1
  360. data/spec/models/post_transfer_bank_model_spec.rb +1 -1
  361. data/spec/models/post_transfer_participant_bank_model_spec.rb +1 -1
  362. data/spec/models/post_ultimate_beneficial_owner_bank_model_spec.rb +1 -1
  363. data/spec/models/post_workflow_bank_model_spec.rb +1 -1
  364. data/spec/models/quote_bank_model_spec.rb +1 -1
  365. data/spec/models/quote_entry_bank_model_spec.rb +1 -1
  366. data/spec/models/quote_entry_destination_account_bank_model_spec.rb +1 -1
  367. data/spec/models/quote_entry_source_account_bank_model_spec.rb +1 -1
  368. data/spec/models/quote_list_bank_model_spec.rb +1 -1
  369. data/spec/models/quote_side_bank_model_spec.rb +1 -1
  370. data/spec/models/quote_type_bank_model_spec.rb +1 -1
  371. data/spec/models/stage_bank_model_spec.rb +1 -1
  372. data/spec/models/symbol_price_bank_model_spec.rb +1 -1
  373. data/spec/models/trade_bank_model_spec.rb +1 -1
  374. data/spec/models/trade_failure_code_bank_model_spec.rb +1 -1
  375. data/spec/models/trade_list_bank_model_spec.rb +1 -1
  376. data/spec/models/trade_side_bank_model_spec.rb +1 -1
  377. data/spec/models/trade_state_bank_model_spec.rb +1 -1
  378. data/spec/models/trade_type_bank_model_spec.rb +1 -1
  379. data/spec/models/transfer_account_type_bank_model_spec.rb +1 -1
  380. data/spec/models/transfer_bank_model_spec.rb +1 -1
  381. data/spec/models/transfer_destination_account_bank_model_spec.rb +1 -1
  382. data/spec/models/transfer_entry_bank_model_spec.rb +1 -1
  383. data/spec/models/transfer_entry_destination_account_bank_model_spec.rb +1 -1
  384. data/spec/models/transfer_failure_code_bank_model_spec.rb +1 -1
  385. data/spec/models/transfer_hold_details_bank_model_spec.rb +1 -1
  386. data/spec/models/transfer_identifiers_inner_bank_model_spec.rb +1 -1
  387. data/spec/models/transfer_list_bank_model_spec.rb +1 -1
  388. data/spec/models/transfer_participant_bank_model_spec.rb +1 -1
  389. data/spec/models/transfer_side_bank_model_spec.rb +1 -1
  390. data/spec/models/transfer_source_account_bank_model_spec.rb +1 -1
  391. data/spec/models/transfer_state_bank_model_spec.rb +1 -1
  392. data/spec/models/transfer_type_bank_model_spec.rb +1 -1
  393. data/spec/models/travel_rule_info_party_bank_model_spec.rb +1 -1
  394. data/spec/models/workflow_bank_model_spec.rb +1 -1
  395. data/spec/models/workflow_state_bank_model_spec.rb +1 -1
  396. data/spec/models/workflow_type_bank_model_spec.rb +1 -1
  397. data/spec/models/workflow_with_details_all_of_bank_model_spec.rb +1 -1
  398. data/spec/models/workflow_with_details_bank_model_spec.rb +1 -1
  399. data/spec/models/workflows_list_bank_model_spec.rb +1 -1
  400. data/spec/spec_helper.rb +1 -1
  401. data/vendor/bundle/ruby/3.3.0/cache/byebug-13.0.0.gem +0 -0
  402. data/vendor/bundle/ruby/3.3.0/cache/io-console-0.8.2.gem +0 -0
  403. data/vendor/bundle/ruby/3.3.0/cache/pry-0.16.0.gem +0 -0
  404. data/vendor/bundle/ruby/3.3.0/cache/pry-byebug-3.12.0.gem +0 -0
  405. data/vendor/bundle/ruby/3.3.0/cache/reline-0.6.3.gem +0 -0
  406. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-13.0.0/byebug/byebug.so +0 -0
  407. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{byebug-12.0.0 → byebug-13.0.0}/gem_make.out +18 -18
  408. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.5.1/gem_make.out +5 -5
  409. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/gem.build_complete +0 -0
  410. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/gem_make.out +39 -0
  411. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/io/console.so +0 -0
  412. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/mkmf.log +352 -0
  413. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  414. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.3.1/gem_make.out +5 -5
  415. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  416. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.2.0/gem_make.out +5 -5
  417. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/CHANGELOG.md +22 -1
  418. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/CONTRIBUTING.md +9 -9
  419. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/GUIDE.md +1 -1
  420. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/README.md +2 -2
  421. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/breakpoint.c +42 -41
  422. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/byebug.c +6 -6
  423. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/byebug.h +2 -0
  424. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/context.c +47 -52
  425. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/threads.c +23 -10
  426. data/vendor/bundle/ruby/3.3.0/gems/byebug-13.0.0/lib/byebug/byebug.so +0 -0
  427. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/irb.rb +2 -1
  428. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/where.rb +1 -1
  429. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/context.rb +1 -1
  430. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/parse.rb +2 -0
  431. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/history.rb +8 -18
  432. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/interfaces/local_interface.rb +8 -8
  433. data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/version.rb +1 -1
  434. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/.document +5 -0
  435. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/BSDL +22 -0
  436. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/COPYING +56 -0
  437. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/README.md +46 -0
  438. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/ext/io/console/Makefile +271 -0
  439. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/ext/io/console/console.c +2022 -0
  440. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/ext/io/console/extconf.rb +61 -0
  441. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/ext/io/console/win32_vk.inc +1390 -0
  442. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/lib/io/console/size.rb +23 -0
  443. data/vendor/bundle/ruby/3.3.0/gems/io-console-0.8.2/lib/io/console.so +0 -0
  444. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/CHANGELOG.md +19 -0
  445. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/LICENSE +1 -1
  446. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/README.md +2 -2
  447. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/cli.rb +1 -1
  448. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/show_doc.rb +1 -10
  449. data/vendor/bundle/ruby/3.3.0/gems/pry-0.16.0/lib/pry/commands/show_source.rb +57 -0
  450. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/config.rb +15 -8
  451. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/method/weird_method_locator.rb +3 -3
  452. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/method.rb +1 -1
  453. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/pry_class.rb +1 -28
  454. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/version.rb +1 -1
  455. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/wrapped_module/candidate.rb +7 -1
  456. data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry.rb +1 -1
  457. data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/CHANGELOG.md +11 -0
  458. data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/README.md +1 -1
  459. data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/version.rb +1 -1
  460. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/BSDL +22 -0
  461. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/COPYING +56 -0
  462. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/README.md +94 -0
  463. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/config.rb +378 -0
  464. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/face.rb +199 -0
  465. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/history.rb +76 -0
  466. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/io/ansi.rb +310 -0
  467. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/io/dumb.rb +120 -0
  468. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/io/windows.rb +530 -0
  469. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/io.rb +55 -0
  470. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_actor/base.rb +37 -0
  471. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_actor/composite.rb +17 -0
  472. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_actor/emacs.rb +517 -0
  473. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_actor/vi_command.rb +518 -0
  474. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_actor/vi_insert.rb +517 -0
  475. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_actor.rb +8 -0
  476. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/key_stroke.rb +119 -0
  477. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/kill_ring.rb +125 -0
  478. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/line_editor.rb +2356 -0
  479. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/unicode/east_asian_width.rb +1292 -0
  480. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/unicode.rb +421 -0
  481. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline/version.rb +3 -0
  482. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/lib/reline.rb +527 -0
  483. data/vendor/bundle/ruby/3.3.0/gems/reline-0.6.3/license_of_rb-readline +25 -0
  484. data/vendor/bundle/ruby/3.3.0/specifications/{byebug-12.0.0.gemspec → byebug-13.0.0.gemspec} +5 -4
  485. data/vendor/bundle/ruby/3.3.0/specifications/io-console-0.8.2.gemspec +25 -0
  486. data/vendor/bundle/ruby/3.3.0/specifications/{pry-0.15.2.gemspec → pry-0.16.0.gemspec} +6 -5
  487. data/vendor/bundle/ruby/3.3.0/specifications/{pry-byebug-3.11.0.gemspec → pry-byebug-3.12.0.gemspec} +8 -7
  488. data/vendor/bundle/ruby/3.3.0/specifications/reline-0.6.3.gemspec +26 -0
  489. metadata +351 -309
  490. data/vendor/bundle/ruby/3.3.0/cache/byebug-12.0.0.gem +0 -0
  491. data/vendor/bundle/ruby/3.3.0/cache/pry-0.15.2.gem +0 -0
  492. data/vendor/bundle/ruby/3.3.0/cache/pry-byebug-3.11.0.gem +0 -0
  493. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-12.0.0/byebug/byebug.so +0 -0
  494. data/vendor/bundle/ruby/3.3.0/gems/byebug-12.0.0/lib/byebug/byebug.so +0 -0
  495. data/vendor/bundle/ruby/3.3.0/gems/pry-0.15.2/lib/pry/commands/show_source.rb +0 -118
  496. /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{byebug-12.0.0 → byebug-13.0.0}/gem.build_complete +0 -0
  497. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/LICENSE +0 -0
  498. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/exe/byebug +0 -0
  499. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/Makefile +0 -0
  500. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/extconf.rb +0 -0
  501. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/ext/byebug/locker.c +0 -0
  502. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/attacher.rb +0 -0
  503. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/breakpoint.rb +0 -0
  504. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/command.rb +0 -0
  505. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/command_list.rb +0 -0
  506. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/break.rb +0 -0
  507. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/catch.rb +0 -0
  508. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/condition.rb +0 -0
  509. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/continue.rb +0 -0
  510. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/debug.rb +0 -0
  511. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/delete.rb +0 -0
  512. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/disable/breakpoints.rb +0 -0
  513. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/disable/display.rb +0 -0
  514. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/disable.rb +0 -0
  515. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/display.rb +0 -0
  516. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/down.rb +0 -0
  517. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/edit.rb +0 -0
  518. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/enable/breakpoints.rb +0 -0
  519. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/enable/display.rb +0 -0
  520. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/enable.rb +0 -0
  521. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/finish.rb +0 -0
  522. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/frame.rb +0 -0
  523. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/help.rb +0 -0
  524. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/history.rb +0 -0
  525. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/info/breakpoints.rb +0 -0
  526. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/info/display.rb +0 -0
  527. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/info/file.rb +0 -0
  528. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/info/line.rb +0 -0
  529. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/info/program.rb +0 -0
  530. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/info.rb +0 -0
  531. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/interrupt.rb +0 -0
  532. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/kill.rb +0 -0
  533. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/list.rb +0 -0
  534. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/method.rb +0 -0
  535. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/next.rb +0 -0
  536. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/pry.rb +0 -0
  537. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/quit.rb +0 -0
  538. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/restart.rb +0 -0
  539. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/save.rb +0 -0
  540. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/set.rb +0 -0
  541. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/show.rb +0 -0
  542. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/skip.rb +0 -0
  543. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/source.rb +0 -0
  544. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/step.rb +0 -0
  545. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/thread/current.rb +0 -0
  546. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/thread/list.rb +0 -0
  547. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/thread/resume.rb +0 -0
  548. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/thread/stop.rb +0 -0
  549. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/thread/switch.rb +0 -0
  550. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/thread.rb +0 -0
  551. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/tracevar.rb +0 -0
  552. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/undisplay.rb +0 -0
  553. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/untracevar.rb +0 -0
  554. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/up.rb +0 -0
  555. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var/all.rb +0 -0
  556. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var/args.rb +0 -0
  557. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var/const.rb +0 -0
  558. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var/global.rb +0 -0
  559. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var/instance.rb +0 -0
  560. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var/local.rb +0 -0
  561. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands/var.rb +0 -0
  562. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/commands.rb +0 -0
  563. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/core.rb +0 -0
  564. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/errors.rb +0 -0
  565. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/frame.rb +0 -0
  566. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/bin.rb +0 -0
  567. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/eval.rb +0 -0
  568. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/file.rb +0 -0
  569. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/frame.rb +0 -0
  570. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/path.rb +0 -0
  571. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/reflection.rb +0 -0
  572. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/string.rb +0 -0
  573. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/thread.rb +0 -0
  574. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/toggle.rb +0 -0
  575. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/helpers/var.rb +0 -0
  576. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/interface.rb +0 -0
  577. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/interfaces/remote_interface.rb +0 -0
  578. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/interfaces/script_interface.rb +0 -0
  579. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/interfaces/test_interface.rb +0 -0
  580. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/option_setter.rb +0 -0
  581. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/printers/base.rb +0 -0
  582. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/printers/plain.rb +0 -0
  583. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/printers/texts/base.yml +0 -0
  584. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/printers/texts/plain.yml +0 -0
  585. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/processors/command_processor.rb +0 -0
  586. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/processors/control_processor.rb +0 -0
  587. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/processors/post_mortem_processor.rb +0 -0
  588. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/processors/script_processor.rb +0 -0
  589. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/remote/client.rb +0 -0
  590. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/remote/server.rb +0 -0
  591. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/remote.rb +0 -0
  592. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/runner.rb +0 -0
  593. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/setting.rb +0 -0
  594. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/autoirb.rb +0 -0
  595. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/autolist.rb +0 -0
  596. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/autopry.rb +0 -0
  597. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/autosave.rb +0 -0
  598. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/basename.rb +0 -0
  599. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/callstyle.rb +0 -0
  600. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/fullpath.rb +0 -0
  601. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/histfile.rb +0 -0
  602. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/histsize.rb +0 -0
  603. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/linetrace.rb +0 -0
  604. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/listsize.rb +0 -0
  605. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/post_mortem.rb +0 -0
  606. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/savefile.rb +0 -0
  607. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/stack_on_error.rb +0 -0
  608. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/settings/width.rb +0 -0
  609. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/source_file_formatter.rb +0 -0
  610. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug/subcommands.rb +0 -0
  611. /data/vendor/bundle/ruby/3.3.0/gems/{byebug-12.0.0 → byebug-13.0.0}/lib/byebug.rb +0 -0
  612. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/bin/pry +0 -0
  613. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/basic_object.rb +0 -0
  614. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/block_command.rb +0 -0
  615. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/class_command.rb +0 -0
  616. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/code/code_file.rb +0 -0
  617. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/code/code_range.rb +0 -0
  618. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/code/loc.rb +0 -0
  619. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/code.rb +0 -0
  620. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/code_object.rb +0 -0
  621. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/color_printer.rb +0 -0
  622. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/command.rb +0 -0
  623. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/command_set.rb +0 -0
  624. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/command_state.rb +0 -0
  625. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/amend_line.rb +0 -0
  626. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/bang.rb +0 -0
  627. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/bang_pry.rb +0 -0
  628. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/cat/abstract_formatter.rb +0 -0
  629. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/cat/exception_formatter.rb +0 -0
  630. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/cat/file_formatter.rb +0 -0
  631. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/cat/input_expression_formatter.rb +0 -0
  632. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/cat.rb +0 -0
  633. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/cd.rb +0 -0
  634. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/change_inspector.rb +0 -0
  635. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/change_prompt.rb +0 -0
  636. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/clear_screen.rb +0 -0
  637. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/code_collector.rb +0 -0
  638. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/disable_pry.rb +0 -0
  639. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/easter_eggs.rb +0 -0
  640. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/edit/exception_patcher.rb +0 -0
  641. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/edit/file_and_line_locator.rb +0 -0
  642. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/edit.rb +0 -0
  643. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/exit.rb +0 -0
  644. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/exit_all.rb +0 -0
  645. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/exit_program.rb +0 -0
  646. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/find_method.rb +0 -0
  647. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/fix_indent.rb +0 -0
  648. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/help.rb +0 -0
  649. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/hist.rb +0 -0
  650. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/import_set.rb +0 -0
  651. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/jump_to.rb +0 -0
  652. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/list_inspectors.rb +0 -0
  653. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/config.rb +0 -0
  654. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/constants.rb +0 -0
  655. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/formatter.rb +0 -0
  656. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/globals.rb +0 -0
  657. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/grep.rb +0 -0
  658. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/instance_vars.rb +0 -0
  659. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/interrogatable.rb +0 -0
  660. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/jruby_hacks.rb +0 -0
  661. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/local_names.rb +0 -0
  662. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/local_vars.rb +0 -0
  663. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/ls_entity.rb +0 -0
  664. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/methods.rb +0 -0
  665. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/methods_helper.rb +0 -0
  666. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls/self_methods.rb +0 -0
  667. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ls.rb +0 -0
  668. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/nesting.rb +0 -0
  669. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/play.rb +0 -0
  670. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/pry_backtrace.rb +0 -0
  671. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/pry_version.rb +0 -0
  672. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/raise_up.rb +0 -0
  673. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/reload_code.rb +0 -0
  674. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/reset.rb +0 -0
  675. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/ri.rb +0 -0
  676. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/save_file.rb +0 -0
  677. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/shell_command.rb +0 -0
  678. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/shell_mode.rb +0 -0
  679. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/show_info.rb +0 -0
  680. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/show_input.rb +0 -0
  681. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/stat.rb +0 -0
  682. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/switch_to.rb +0 -0
  683. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/toggle_color.rb +0 -0
  684. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/watch_expression/expression.rb +0 -0
  685. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/watch_expression.rb +0 -0
  686. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/whereami.rb +0 -0
  687. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/commands/wtf.rb +0 -0
  688. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/config/attributable.rb +0 -0
  689. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/config/lazy_value.rb +0 -0
  690. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/config/memoized_value.rb +0 -0
  691. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/config/value.rb +0 -0
  692. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/control_d_handler.rb +0 -0
  693. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/core_extensions.rb +0 -0
  694. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/editor.rb +0 -0
  695. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/env.rb +0 -0
  696. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/exception_handler.rb +0 -0
  697. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/exceptions.rb +0 -0
  698. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/forwardable.rb +0 -0
  699. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/base_helpers.rb +0 -0
  700. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/command_helpers.rb +0 -0
  701. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/documentation_helpers.rb +0 -0
  702. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/options_helpers.rb +0 -0
  703. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/platform.rb +0 -0
  704. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/table.rb +0 -0
  705. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers/text.rb +0 -0
  706. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/helpers.rb +0 -0
  707. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/history.rb +0 -0
  708. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/hooks.rb +0 -0
  709. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/indent.rb +0 -0
  710. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/input/simple_stdio.rb +0 -0
  711. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/input_completer.rb +0 -0
  712. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/input_lock.rb +0 -0
  713. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/inspector.rb +0 -0
  714. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/last_exception.rb +0 -0
  715. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/method/disowned.rb +0 -0
  716. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/method/patcher.rb +0 -0
  717. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/object_path.rb +0 -0
  718. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/output.rb +0 -0
  719. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/pager.rb +0 -0
  720. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/prompt.rb +0 -0
  721. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/pry_instance.rb +0 -0
  722. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/repl.rb +0 -0
  723. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/repl_file_loader.rb +0 -0
  724. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/ring.rb +0 -0
  725. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/slop/LICENSE +0 -0
  726. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/slop/commands.rb +0 -0
  727. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/slop/option.rb +0 -0
  728. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/slop.rb +0 -0
  729. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/syntax_highlighter.rb +0 -0
  730. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/system_command_handler.rb +0 -0
  731. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/testable/evalable.rb +0 -0
  732. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/testable/mockable.rb +0 -0
  733. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/testable/pry_tester.rb +0 -0
  734. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/testable/utility.rb +0 -0
  735. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/testable/variables.rb +0 -0
  736. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/testable.rb +0 -0
  737. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/warning.rb +0 -0
  738. /data/vendor/bundle/ruby/3.3.0/gems/{pry-0.15.2 → pry-0.16.0}/lib/pry/wrapped_module.rb +0 -0
  739. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/LICENSE +0 -0
  740. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/byebug/processors/pry_processor.rb +0 -0
  741. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry/byebug/breakpoints.rb +0 -0
  742. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/base.rb +0 -0
  743. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/cli.rb +0 -0
  744. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/backtrace.rb +0 -0
  745. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/breakpoint.rb +0 -0
  746. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/continue.rb +0 -0
  747. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/down.rb +0 -0
  748. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/exit_all.rb +0 -0
  749. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/finish.rb +0 -0
  750. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/frame.rb +0 -0
  751. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/next.rb +0 -0
  752. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/step.rb +0 -0
  753. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands/up.rb +0 -0
  754. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/commands.rb +0 -0
  755. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/control_d_handler.rb +0 -0
  756. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/helpers/breakpoints.rb +0 -0
  757. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/helpers/location.rb +0 -0
  758. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/helpers/multiline.rb +0 -0
  759. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/helpers/navigation.rb +0 -0
  760. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/pry_ext.rb +0 -0
  761. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug/pry_remote_ext.rb +0 -0
  762. /data/vendor/bundle/ruby/3.3.0/gems/{pry-byebug-3.11.0 → pry-byebug-3.12.0}/lib/pry-byebug.rb +0 -0
@@ -0,0 +1,2022 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: t -*- */
2
+ /*
3
+ * console IO module
4
+ */
5
+
6
+ static const char *const
7
+ IO_CONSOLE_VERSION = "0.8.2";
8
+
9
+ #include "ruby.h"
10
+ #include "ruby/io.h"
11
+ #include "ruby/thread.h"
12
+
13
+ #ifdef HAVE_UNISTD_H
14
+ #include <unistd.h>
15
+ #endif
16
+ #ifdef HAVE_FCNTL_H
17
+ #include <fcntl.h>
18
+ #endif
19
+ #ifdef HAVE_SYS_IOCTL_H
20
+ #include <sys/ioctl.h>
21
+ #endif
22
+
23
+ #if defined HAVE_TERMIOS_H
24
+ # include <termios.h>
25
+ typedef struct termios conmode;
26
+
27
+ static int
28
+ setattr(int fd, conmode *t)
29
+ {
30
+ while (tcsetattr(fd, TCSANOW, t)) {
31
+ if (errno != EINTR) return 0;
32
+ }
33
+ return 1;
34
+ }
35
+ # define getattr(fd, t) (tcgetattr(fd, t) == 0)
36
+ #elif defined HAVE_TERMIO_H
37
+ # include <termio.h>
38
+ typedef struct termio conmode;
39
+ # define setattr(fd, t) (ioctl(fd, TCSETAF, t) == 0)
40
+ # define getattr(fd, t) (ioctl(fd, TCGETA, t) == 0)
41
+ #elif defined HAVE_SGTTY_H
42
+ # include <sgtty.h>
43
+ typedef struct sgttyb conmode;
44
+ # ifdef HAVE_STTY
45
+ # define setattr(fd, t) (stty(fd, t) == 0)
46
+ # else
47
+ # define setattr(fd, t) (ioctl((fd), TIOCSETP, (t)) == 0)
48
+ # endif
49
+ # ifdef HAVE_GTTY
50
+ # define getattr(fd, t) (gtty(fd, t) == 0)
51
+ # else
52
+ # define getattr(fd, t) (ioctl((fd), TIOCGETP, (t)) == 0)
53
+ # endif
54
+ #elif defined _WIN32
55
+ #include <winioctl.h>
56
+ #include <conio.h>
57
+ typedef DWORD conmode;
58
+
59
+ #define LAST_ERROR rb_w32_map_errno(GetLastError())
60
+ #define SET_LAST_ERROR (errno = LAST_ERROR, 0)
61
+
62
+ static int
63
+ setattr(int fd, conmode *t)
64
+ {
65
+ int x = SetConsoleMode((HANDLE)rb_w32_get_osfhandle(fd), *t);
66
+ if (!x) errno = LAST_ERROR;
67
+ return x;
68
+ }
69
+
70
+ static int
71
+ getattr(int fd, conmode *t)
72
+ {
73
+ int x = GetConsoleMode((HANDLE)rb_w32_get_osfhandle(fd), t);
74
+ if (!x) errno = LAST_ERROR;
75
+ return x;
76
+ }
77
+ #endif
78
+ #ifndef SET_LAST_ERROR
79
+ #define SET_LAST_ERROR (0)
80
+ #endif
81
+
82
+ #define CSI "\x1b\x5b"
83
+
84
+ static ID id_getc, id_close;
85
+ static ID id_gets, id_flush, id_chomp_bang;
86
+
87
+ #ifndef HAVE_RB_INTERNED_STR_CSTR
88
+ # define rb_str_to_interned_str(str) rb_str_freeze(str)
89
+ # define rb_interned_str_cstr(str) rb_str_freeze(rb_usascii_str_new_cstr(str))
90
+ #endif
91
+
92
+ #if defined HAVE_RUBY_FIBER_SCHEDULER_H
93
+ # include "ruby/fiber/scheduler.h"
94
+ #elif defined HAVE_RB_SCHEDULER_TIMEOUT
95
+ extern VALUE rb_scheduler_timeout(struct timeval *timeout);
96
+ # define rb_fiber_scheduler_make_timeout rb_scheduler_timeout
97
+ #endif
98
+
99
+ #ifndef HAVE_RB_IO_DESCRIPTOR
100
+ static int
101
+ io_descriptor_fallback(VALUE io)
102
+ {
103
+ rb_io_t *fptr;
104
+ GetOpenFile(io, fptr);
105
+ return fptr->fd;
106
+ }
107
+ #define rb_io_descriptor io_descriptor_fallback
108
+ #endif
109
+
110
+ #ifndef HAVE_RB_IO_PATH
111
+ static VALUE
112
+ io_path_fallback(VALUE io)
113
+ {
114
+ rb_io_t *fptr;
115
+ GetOpenFile(io, fptr);
116
+ return fptr->pathv;
117
+ }
118
+ #define rb_io_path io_path_fallback
119
+ #endif
120
+
121
+ #ifndef HAVE_RB_IO_GET_WRITE_IO
122
+ static VALUE
123
+ io_get_write_io_fallback(VALUE io)
124
+ {
125
+ rb_io_t *fptr;
126
+ GetOpenFile(io, fptr);
127
+ VALUE wio = fptr->tied_io_for_writing;
128
+ return wio ? wio : io;
129
+ }
130
+ #define rb_io_get_write_io io_get_write_io_fallback
131
+ #endif
132
+
133
+ #ifndef DHAVE_RB_SYSERR_FAIL_STR
134
+ # define rb_syserr_fail_str(e, mesg) rb_exc_raise(rb_syserr_new_str(e, mesg))
135
+ #endif
136
+
137
+ #define sys_fail(io) do { \
138
+ int err = errno; \
139
+ rb_syserr_fail_str(err, rb_io_path(io)); \
140
+ } while (0)
141
+
142
+ #ifndef HAVE_RB_F_SEND
143
+ #ifndef RB_PASS_CALLED_KEYWORDS
144
+ # define rb_funcallv_kw(recv, mid, arg, argv, kw_splat) rb_funcallv(recv, mid, arg, argv)
145
+ #endif
146
+
147
+ static ID id___send__;
148
+
149
+ static VALUE
150
+ rb_f_send(int argc, VALUE *argv, VALUE recv)
151
+ {
152
+ VALUE sym = argv[0];
153
+ ID vid = rb_check_id(&sym);
154
+ if (vid) {
155
+ --argc;
156
+ ++argv;
157
+ }
158
+ else {
159
+ vid = id___send__;
160
+ }
161
+ return rb_funcallv_kw(recv, vid, argc, argv, RB_PASS_CALLED_KEYWORDS);
162
+ }
163
+ #endif
164
+
165
+ enum rawmode_opt_ids {
166
+ kwd_min,
167
+ kwd_time,
168
+ kwd_intr,
169
+ rawmode_opt_id_count
170
+ };
171
+ static ID rawmode_opt_ids[rawmode_opt_id_count];
172
+
173
+ typedef struct {
174
+ int vmin;
175
+ int vtime;
176
+ int intr;
177
+ } rawmode_arg_t;
178
+
179
+ #ifndef UNDEF_P
180
+ # define UNDEF_P(obj) ((obj) == Qundef)
181
+ #endif
182
+ #ifndef NIL_OR_UNDEF_P
183
+ # define NIL_OR_UNDEF_P(obj) (NIL_P(obj) || UNDEF_P(obj))
184
+ #endif
185
+
186
+ static rawmode_arg_t *
187
+ rawmode_opt(int *argcp, VALUE *argv, int min_argc, int max_argc, rawmode_arg_t *opts)
188
+ {
189
+ int argc = *argcp;
190
+ rawmode_arg_t *optp = NULL;
191
+ VALUE vopts = Qnil;
192
+ VALUE optvals[rawmode_opt_id_count];
193
+ #ifdef RB_SCAN_ARGS_PASS_CALLED_KEYWORDS
194
+ argc = rb_scan_args(argc, argv, "*:", NULL, &vopts);
195
+ #else
196
+ if (argc > min_argc) {
197
+ vopts = rb_check_hash_type(argv[argc-1]);
198
+ if (!NIL_P(vopts)) {
199
+ argv[argc-1] = vopts;
200
+ vopts = rb_extract_keywords(&argv[argc-1]);
201
+ if (!argv[argc-1]) *argcp = --argc;
202
+ if (!vopts) vopts = Qnil;
203
+ }
204
+ }
205
+ #endif
206
+ rb_check_arity(argc, min_argc, max_argc);
207
+ if (rb_get_kwargs(vopts, rawmode_opt_ids,
208
+ 0, rawmode_opt_id_count, optvals)) {
209
+ VALUE vmin = optvals[kwd_min];
210
+ VALUE vtime = optvals[kwd_time];
211
+ VALUE intr = optvals[kwd_intr];
212
+ /* default values by `stty raw` */
213
+ opts->vmin = 1;
214
+ opts->vtime = 0;
215
+ opts->intr = 0;
216
+ if (!NIL_OR_UNDEF_P(vmin)) {
217
+ opts->vmin = NUM2INT(vmin);
218
+ optp = opts;
219
+ }
220
+ if (!NIL_OR_UNDEF_P(vtime)) {
221
+ VALUE v10 = INT2FIX(10);
222
+ vtime = rb_funcall3(vtime, '*', 1, &v10);
223
+ opts->vtime = NUM2INT(vtime);
224
+ optp = opts;
225
+ }
226
+ switch (intr) {
227
+ case Qtrue:
228
+ opts->intr = 1;
229
+ optp = opts;
230
+ break;
231
+ case Qfalse:
232
+ opts->intr = 0;
233
+ optp = opts;
234
+ break;
235
+ case Qundef:
236
+ case Qnil:
237
+ break;
238
+ default:
239
+ rb_raise(rb_eArgError, "true or false expected as intr: %"PRIsVALUE,
240
+ intr);
241
+ }
242
+ }
243
+ return optp;
244
+ }
245
+
246
+ static void
247
+ set_rawmode(conmode *t, void *arg)
248
+ {
249
+ #ifdef HAVE_CFMAKERAW
250
+ cfmakeraw(t);
251
+ t->c_lflag &= ~(ECHOE|ECHOK);
252
+ #elif defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
253
+ t->c_iflag &= ~(IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL);
254
+ t->c_oflag &= ~OPOST;
255
+ t->c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|XCASE);
256
+ t->c_cflag &= ~(CSIZE|PARENB);
257
+ t->c_cflag |= CS8;
258
+ t->c_cc[VMIN] = 1;
259
+ t->c_cc[VTIME] = 0;
260
+ #elif defined HAVE_SGTTY_H
261
+ t->sg_flags &= ~ECHO;
262
+ t->sg_flags |= RAW;
263
+ #elif defined _WIN32
264
+ *t = 0;
265
+ #endif
266
+ if (arg) {
267
+ const rawmode_arg_t *r = arg;
268
+ #ifdef VMIN
269
+ if (r->vmin >= 0) t->c_cc[VMIN] = r->vmin;
270
+ #endif
271
+ #ifdef VTIME
272
+ if (r->vtime >= 0) t->c_cc[VTIME] = r->vtime;
273
+ #endif
274
+ #ifdef ISIG
275
+ if (r->intr) {
276
+ t->c_iflag |= BRKINT;
277
+ t->c_lflag |= ISIG;
278
+ t->c_oflag |= OPOST;
279
+ }
280
+ #endif
281
+ (void)r;
282
+ }
283
+ }
284
+
285
+ static void
286
+ set_cookedmode(conmode *t, void *arg)
287
+ {
288
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
289
+ t->c_iflag |= (BRKINT|ISTRIP|ICRNL|IXON);
290
+ t->c_oflag |= OPOST;
291
+ t->c_lflag |= (ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN);
292
+ #elif defined HAVE_SGTTY_H
293
+ t->sg_flags |= ECHO;
294
+ t->sg_flags &= ~RAW;
295
+ #elif defined _WIN32
296
+ *t |= ENABLE_ECHO_INPUT|ENABLE_LINE_INPUT|ENABLE_PROCESSED_INPUT;
297
+ #endif
298
+ }
299
+
300
+ static void
301
+ set_noecho(conmode *t, void *arg)
302
+ {
303
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
304
+ t->c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
305
+ #elif defined HAVE_SGTTY_H
306
+ t->sg_flags &= ~ECHO;
307
+ #elif defined _WIN32
308
+ *t &= ~ENABLE_ECHO_INPUT;
309
+ #endif
310
+ }
311
+
312
+ static void
313
+ set_echo(conmode *t, void *arg)
314
+ {
315
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
316
+ t->c_lflag |= (ECHO | ECHOE | ECHOK | ECHONL);
317
+ #elif defined HAVE_SGTTY_H
318
+ t->sg_flags |= ECHO;
319
+ #elif defined _WIN32
320
+ *t |= ENABLE_ECHO_INPUT;
321
+ #endif
322
+ }
323
+
324
+ static int
325
+ echo_p(conmode *t)
326
+ {
327
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
328
+ return (t->c_lflag & (ECHO | ECHONL)) != 0;
329
+ #elif defined HAVE_SGTTY_H
330
+ return (t->sg_flags & ECHO) != 0;
331
+ #elif defined _WIN32
332
+ return (*t & ENABLE_ECHO_INPUT) != 0;
333
+ #endif
334
+ }
335
+
336
+ static int
337
+ set_ttymode(int fd, conmode *t, void (*setter)(conmode *, void *), void *arg)
338
+ {
339
+ conmode r;
340
+ if (!getattr(fd, t)) return 0;
341
+ r = *t;
342
+ setter(&r, arg);
343
+ return setattr(fd, &r);
344
+ }
345
+
346
+ #define GetReadFD(io) rb_io_descriptor(io)
347
+ #define GetWriteFD(io) rb_io_descriptor(rb_io_get_write_io(io))
348
+
349
+ #define FD_PER_IO 2
350
+
351
+ static VALUE
352
+ ttymode(VALUE io, VALUE (*func)(VALUE), VALUE farg, void (*setter)(conmode *, void *), void *arg)
353
+ {
354
+ int status = -1;
355
+ int error = 0;
356
+ int fd[FD_PER_IO];
357
+ conmode t[FD_PER_IO];
358
+ VALUE result = Qnil;
359
+
360
+ fd[0] = GetReadFD(io);
361
+ if (fd[0] != -1) {
362
+ if (set_ttymode(fd[0], t+0, setter, arg)) {
363
+ status = 0;
364
+ }
365
+ else {
366
+ error = errno;
367
+ fd[0] = -1;
368
+ }
369
+ }
370
+ fd[1] = GetWriteFD(io);
371
+ if (fd[1] != -1 && fd[1] != fd[0]) {
372
+ if (set_ttymode(fd[1], t+1, setter, arg)) {
373
+ status = 0;
374
+ }
375
+ else {
376
+ error = errno;
377
+ fd[1] = -1;
378
+ }
379
+ }
380
+ if (status == 0) {
381
+ result = rb_protect(func, farg, &status);
382
+ }
383
+ if (fd[0] != -1 && fd[0] == GetReadFD(io)) {
384
+ if (!setattr(fd[0], t+0)) {
385
+ error = errno;
386
+ status = -1;
387
+ }
388
+ }
389
+ if (fd[1] != -1 && fd[1] != fd[0] && fd[1] == GetWriteFD(io)) {
390
+ if (!setattr(fd[1], t+1)) {
391
+ error = errno;
392
+ status = -1;
393
+ }
394
+ }
395
+ if (status) {
396
+ if (status == -1) {
397
+ rb_syserr_fail(error, 0);
398
+ }
399
+ rb_jump_tag(status);
400
+ }
401
+ return result;
402
+ }
403
+
404
+ #if !defined _WIN32
405
+ struct ttymode_callback_args {
406
+ VALUE (*func)(VALUE, VALUE);
407
+ VALUE io;
408
+ VALUE farg;
409
+ };
410
+
411
+ static VALUE
412
+ ttymode_callback(VALUE args)
413
+ {
414
+ struct ttymode_callback_args *argp = (struct ttymode_callback_args *)args;
415
+ return argp->func(argp->io, argp->farg);
416
+ }
417
+
418
+ static VALUE
419
+ ttymode_with_io(VALUE io, VALUE (*func)(VALUE, VALUE), VALUE farg, void (*setter)(conmode *, void *), void *arg)
420
+ {
421
+ struct ttymode_callback_args cargs;
422
+ cargs.func = func;
423
+ cargs.io = io;
424
+ cargs.farg = farg;
425
+ return ttymode(io, ttymode_callback, (VALUE)&cargs, setter, arg);
426
+ }
427
+ #endif
428
+
429
+ /*
430
+ * call-seq:
431
+ * io.raw(min: nil, time: nil, intr: nil) {|io| }
432
+ *
433
+ * Yields +self+ within raw mode, and returns the result of the block.
434
+ *
435
+ * STDIN.raw(&:gets)
436
+ *
437
+ * will read and return a line without echo back and line editing.
438
+ *
439
+ * The parameter +min+ specifies the minimum number of bytes that
440
+ * should be received when a read operation is performed. (default: 1)
441
+ *
442
+ * The parameter +time+ specifies the timeout in _seconds_ with a
443
+ * precision of 1/10 of a second. (default: 0)
444
+ *
445
+ * If the parameter +intr+ is +true+, enables break, interrupt, quit,
446
+ * and suspend special characters.
447
+ *
448
+ * Refer to the manual page of termios for further details.
449
+ *
450
+ * You must require 'io/console' to use this method.
451
+ */
452
+ static VALUE
453
+ console_raw(int argc, VALUE *argv, VALUE io)
454
+ {
455
+ rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 0, &opts);
456
+ return ttymode(io, rb_yield, io, set_rawmode, optp);
457
+ }
458
+
459
+ /*
460
+ * call-seq:
461
+ * io.raw!(min: nil, time: nil, intr: nil) -> io
462
+ *
463
+ * Enables raw mode, and returns +io+.
464
+ *
465
+ * If the terminal mode needs to be back, use <code>io.raw { ... }</code>.
466
+ *
467
+ * See IO#raw for details on the parameters.
468
+ *
469
+ * You must require 'io/console' to use this method.
470
+ */
471
+ static VALUE
472
+ console_set_raw(int argc, VALUE *argv, VALUE io)
473
+ {
474
+ conmode t;
475
+ rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 0, &opts);
476
+ int fd = GetReadFD(io);
477
+ if (!getattr(fd, &t)) sys_fail(io);
478
+ set_rawmode(&t, optp);
479
+ if (!setattr(fd, &t)) sys_fail(io);
480
+ return io;
481
+ }
482
+
483
+ /*
484
+ * call-seq:
485
+ * io.cooked {|io| }
486
+ *
487
+ * Yields +self+ within cooked mode.
488
+ *
489
+ * STDIN.cooked(&:gets)
490
+ *
491
+ * will read and return a line with echo back and line editing.
492
+ *
493
+ * You must require 'io/console' to use this method.
494
+ */
495
+ static VALUE
496
+ console_cooked(VALUE io)
497
+ {
498
+ return ttymode(io, rb_yield, io, set_cookedmode, NULL);
499
+ }
500
+
501
+ /*
502
+ * call-seq:
503
+ * io.cooked!
504
+ *
505
+ * Enables cooked mode.
506
+ *
507
+ * If the terminal mode needs to be back, use io.cooked { ... }.
508
+ *
509
+ * You must require 'io/console' to use this method.
510
+ */
511
+ static VALUE
512
+ console_set_cooked(VALUE io)
513
+ {
514
+ conmode t;
515
+ int fd = GetReadFD(io);
516
+ if (!getattr(fd, &t)) sys_fail(io);
517
+ set_cookedmode(&t, NULL);
518
+ if (!setattr(fd, &t)) sys_fail(io);
519
+ return io;
520
+ }
521
+
522
+ #ifndef _WIN32
523
+ static VALUE
524
+ getc_call(VALUE io)
525
+ {
526
+ return rb_funcallv(io, id_getc, 0, 0);
527
+ }
528
+ #else
529
+ static void *
530
+ nogvl_getch(void *p)
531
+ {
532
+ int len = 0;
533
+ wint_t *buf = p, c = _getwch();
534
+
535
+ switch (c) {
536
+ case WEOF:
537
+ break;
538
+ case 0x00:
539
+ case 0xe0:
540
+ buf[len++] = c;
541
+ c = _getwch();
542
+ /* fall through */
543
+ default:
544
+ buf[len++] = c;
545
+ break;
546
+ }
547
+ return (void *)(VALUE)len;
548
+ }
549
+ #endif
550
+
551
+ /*
552
+ * call-seq:
553
+ * io.getch(min: nil, time: nil, intr: nil) -> char
554
+ *
555
+ * Reads and returns a character in raw mode.
556
+ *
557
+ * See IO#raw for details on the parameters.
558
+ *
559
+ * You must require 'io/console' to use this method.
560
+ */
561
+ static VALUE
562
+ console_getch(int argc, VALUE *argv, VALUE io)
563
+ {
564
+ rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 0, &opts);
565
+ #ifndef _WIN32
566
+ return ttymode(io, getc_call, io, set_rawmode, optp);
567
+ #else
568
+ rb_io_t *fptr;
569
+ VALUE str;
570
+ wint_t c;
571
+ int len;
572
+ char buf[8];
573
+ wint_t wbuf[2];
574
+ # ifndef HAVE_RB_IO_WAIT
575
+ struct timeval *to = NULL, tv;
576
+ # else
577
+ VALUE timeout = Qnil;
578
+ # endif
579
+
580
+ GetOpenFile(io, fptr);
581
+ if (optp) {
582
+ if (optp->vtime) {
583
+ # ifndef HAVE_RB_IO_WAIT
584
+ to = &tv;
585
+ # else
586
+ struct timeval tv;
587
+ # endif
588
+ tv.tv_sec = optp->vtime / 10;
589
+ tv.tv_usec = (optp->vtime % 10) * 100000;
590
+ # ifdef HAVE_RB_IO_WAIT
591
+ timeout = rb_fiber_scheduler_make_timeout(&tv);
592
+ # endif
593
+ }
594
+ switch (optp->vmin) {
595
+ case 1: /* default */
596
+ break;
597
+ case 0: /* return nil when timed out */
598
+ if (optp->vtime) break;
599
+ /* fallthru */
600
+ default:
601
+ rb_warning("min option larger than 1 ignored");
602
+ }
603
+ if (optp->intr) {
604
+ # ifndef HAVE_RB_IO_WAIT
605
+ int w = rb_wait_for_single_fd(fptr->fd, RB_WAITFD_IN, to);
606
+ if (w < 0) rb_eof_error();
607
+ if (!(w & RB_WAITFD_IN)) return Qnil;
608
+ # else
609
+ VALUE result = rb_io_wait(io, RB_INT2NUM(RUBY_IO_READABLE), timeout);
610
+ if (!RTEST(result)) return Qnil;
611
+ # endif
612
+ }
613
+ else if (optp->vtime) {
614
+ rb_warning("Non-zero vtime option ignored if intr flag is unset");
615
+ }
616
+ }
617
+ len = (int)(VALUE)rb_thread_call_without_gvl(nogvl_getch, wbuf, RUBY_UBF_IO, 0);
618
+ switch (len) {
619
+ case 0:
620
+ return Qnil;
621
+ case 2:
622
+ buf[0] = (char)wbuf[0];
623
+ c = wbuf[1];
624
+ len = 1;
625
+ do {
626
+ buf[len++] = (unsigned char)c;
627
+ } while ((c >>= CHAR_BIT) && len < (int)sizeof(buf));
628
+ return rb_str_new(buf, len);
629
+ default:
630
+ c = wbuf[0];
631
+ len = rb_uv_to_utf8(buf, c);
632
+ str = rb_utf8_str_new(buf, len);
633
+ return rb_str_conv_enc(str, NULL, rb_default_external_encoding());
634
+ }
635
+ #endif
636
+ }
637
+
638
+ /*
639
+ * call-seq:
640
+ * io.noecho {|io| }
641
+ *
642
+ * Yields +self+ with disabling echo back.
643
+ *
644
+ * STDIN.noecho(&:gets)
645
+ *
646
+ * will read and return a line without echo back.
647
+ *
648
+ * You must require 'io/console' to use this method.
649
+ */
650
+ static VALUE
651
+ console_noecho(VALUE io)
652
+ {
653
+ return ttymode(io, rb_yield, io, set_noecho, NULL);
654
+ }
655
+
656
+ /*
657
+ * call-seq:
658
+ * io.echo = flag
659
+ *
660
+ * Enables/disables echo back.
661
+ * On some platforms, all combinations of this flags and raw/cooked
662
+ * mode may not be valid.
663
+ *
664
+ * You must require 'io/console' to use this method.
665
+ */
666
+ static VALUE
667
+ console_set_echo(VALUE io, VALUE f)
668
+ {
669
+ conmode t;
670
+ int fd = GetReadFD(io);
671
+
672
+ if (!getattr(fd, &t)) sys_fail(io);
673
+
674
+ if (RTEST(f))
675
+ set_echo(&t, NULL);
676
+ else
677
+ set_noecho(&t, NULL);
678
+
679
+ if (!setattr(fd, &t)) sys_fail(io);
680
+
681
+ return io;
682
+ }
683
+
684
+ /*
685
+ * call-seq:
686
+ * io.echo? -> true or false
687
+ *
688
+ * Returns +true+ if echo back is enabled.
689
+ *
690
+ * You must require 'io/console' to use this method.
691
+ */
692
+ static VALUE
693
+ console_echo_p(VALUE io)
694
+ {
695
+ conmode t;
696
+ int fd = GetReadFD(io);
697
+
698
+ if (!getattr(fd, &t)) sys_fail(io);
699
+ return echo_p(&t) ? Qtrue : Qfalse;
700
+ }
701
+
702
+ static const rb_data_type_t conmode_type = {
703
+ "console-mode",
704
+ {0, RUBY_TYPED_DEFAULT_FREE,},
705
+ 0, 0,
706
+ RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED,
707
+ };
708
+ static VALUE cConmode;
709
+
710
+ static VALUE
711
+ conmode_alloc(VALUE klass)
712
+ {
713
+ return rb_data_typed_object_zalloc(klass, sizeof(conmode), &conmode_type);
714
+ }
715
+
716
+ static VALUE
717
+ conmode_new(VALUE klass, const conmode *t)
718
+ {
719
+ VALUE obj = conmode_alloc(klass);
720
+ *(conmode *)DATA_PTR(obj) = *t;
721
+ return obj;
722
+ }
723
+
724
+ static VALUE
725
+ conmode_init_copy(VALUE obj, VALUE obj2)
726
+ {
727
+ conmode *t = rb_check_typeddata(obj, &conmode_type);
728
+ conmode *t2 = rb_check_typeddata(obj2, &conmode_type);
729
+ *t = *t2;
730
+ return obj;
731
+ }
732
+
733
+ static VALUE
734
+ conmode_set_echo(VALUE obj, VALUE f)
735
+ {
736
+ conmode *t = rb_check_typeddata(obj, &conmode_type);
737
+ if (RTEST(f))
738
+ set_echo(t, NULL);
739
+ else
740
+ set_noecho(t, NULL);
741
+ return obj;
742
+ }
743
+
744
+ static VALUE
745
+ conmode_set_raw(int argc, VALUE *argv, VALUE obj)
746
+ {
747
+ conmode *t = rb_check_typeddata(obj, &conmode_type);
748
+ rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 0, &opts);
749
+
750
+ set_rawmode(t, optp);
751
+ return obj;
752
+ }
753
+
754
+ static VALUE
755
+ conmode_raw_new(int argc, VALUE *argv, VALUE obj)
756
+ {
757
+ conmode *r = rb_check_typeddata(obj, &conmode_type);
758
+ conmode t = *r;
759
+ rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 0, &opts);
760
+
761
+ set_rawmode(&t, optp);
762
+ return conmode_new(rb_obj_class(obj), &t);
763
+ }
764
+
765
+ /*
766
+ * call-seq:
767
+ * io.console_mode -> mode
768
+ *
769
+ * Returns a data represents the current console mode.
770
+ *
771
+ * You must require 'io/console' to use this method.
772
+ */
773
+ static VALUE
774
+ console_conmode_get(VALUE io)
775
+ {
776
+ conmode t;
777
+ int fd = GetReadFD(io);
778
+
779
+ if (!getattr(fd, &t)) sys_fail(io);
780
+
781
+ return conmode_new(cConmode, &t);
782
+ }
783
+
784
+ /*
785
+ * call-seq:
786
+ * io.console_mode = mode
787
+ *
788
+ * Sets the console mode to +mode+.
789
+ *
790
+ * You must require 'io/console' to use this method.
791
+ */
792
+ static VALUE
793
+ console_conmode_set(VALUE io, VALUE mode)
794
+ {
795
+ conmode *t, r;
796
+ int fd = GetReadFD(io);
797
+
798
+ TypedData_Get_Struct(mode, conmode, &conmode_type, t);
799
+ r = *t;
800
+
801
+ if (!setattr(fd, &r)) sys_fail(io);
802
+
803
+ return mode;
804
+ }
805
+
806
+ #if defined TIOCGWINSZ
807
+ typedef struct winsize rb_console_size_t;
808
+ #define getwinsize(fd, buf) (ioctl((fd), TIOCGWINSZ, (buf)) == 0)
809
+ #define setwinsize(fd, buf) (ioctl((fd), TIOCSWINSZ, (buf)) == 0)
810
+ #define winsize_row(buf) (buf)->ws_row
811
+ #define winsize_col(buf) (buf)->ws_col
812
+ #elif defined _WIN32
813
+ typedef CONSOLE_SCREEN_BUFFER_INFO rb_console_size_t;
814
+ #define getwinsize(fd, buf) ( \
815
+ GetConsoleScreenBufferInfo((HANDLE)rb_w32_get_osfhandle(fd), (buf)) || \
816
+ SET_LAST_ERROR)
817
+ #define winsize_row(buf) ((buf)->srWindow.Bottom - (buf)->srWindow.Top + 1)
818
+ #define winsize_col(buf) (buf)->dwSize.X
819
+ #endif
820
+
821
+ #if defined TIOCGWINSZ || defined _WIN32
822
+ #define USE_CONSOLE_GETSIZE 1
823
+ #endif
824
+
825
+ #ifdef USE_CONSOLE_GETSIZE
826
+ /*
827
+ * call-seq:
828
+ * io.winsize -> [rows, columns]
829
+ *
830
+ * Returns console size.
831
+ *
832
+ * You must require 'io/console' to use this method.
833
+ */
834
+ static VALUE
835
+ console_winsize(VALUE io)
836
+ {
837
+ rb_console_size_t ws;
838
+ int fd = GetWriteFD(io);
839
+ if (!getwinsize(fd, &ws)) sys_fail(io);
840
+ return rb_assoc_new(INT2NUM(winsize_row(&ws)), INT2NUM(winsize_col(&ws)));
841
+ }
842
+
843
+ static VALUE console_scroll(VALUE io, int line);
844
+ static VALUE console_goto(VALUE io, VALUE y, VALUE x);
845
+
846
+ /*
847
+ * call-seq:
848
+ * io.winsize = [rows, columns]
849
+ *
850
+ * Tries to set console size. The effect depends on the platform and
851
+ * the running environment.
852
+ *
853
+ * You must require 'io/console' to use this method.
854
+ */
855
+ static VALUE
856
+ console_set_winsize(VALUE io, VALUE size)
857
+ {
858
+ rb_console_size_t ws;
859
+ #if defined _WIN32
860
+ HANDLE wh;
861
+ int newrow, newcol;
862
+ COORD oldsize;
863
+ SMALL_RECT oldwindow;
864
+ BOOL ret;
865
+ #endif
866
+ VALUE row, col, xpixel, ypixel;
867
+ const VALUE *sz;
868
+ long sizelen;
869
+ int fd;
870
+
871
+ size = rb_Array(size);
872
+ if ((sizelen = RARRAY_LEN(size)) != 2 && sizelen != 4) {
873
+ rb_raise(rb_eArgError, "wrong number of arguments (given %ld, expected 2 or 4)", sizelen);
874
+ }
875
+ sz = RARRAY_CONST_PTR(size);
876
+ row = sz[0], col = sz[1], xpixel = ypixel = Qnil;
877
+ if (sizelen == 4) xpixel = sz[2], ypixel = sz[3];
878
+ fd = GetWriteFD(io);
879
+ #if defined TIOCSWINSZ
880
+ ws.ws_row = ws.ws_col = ws.ws_xpixel = ws.ws_ypixel = 0;
881
+ #define SET(m) ws.ws_##m = NIL_P(m) ? 0 : (unsigned short)NUM2UINT(m)
882
+ SET(row);
883
+ SET(col);
884
+ SET(xpixel);
885
+ SET(ypixel);
886
+ #undef SET
887
+ if (!setwinsize(fd, &ws)) sys_fail(io);
888
+ #elif defined _WIN32
889
+ wh = (HANDLE)rb_w32_get_osfhandle(fd);
890
+ #define SET(m) new##m = NIL_P(m) ? 0 : (unsigned short)NUM2UINT(m)
891
+ SET(row);
892
+ SET(col);
893
+ #undef SET
894
+ if (!NIL_P(xpixel)) (void)NUM2UINT(xpixel);
895
+ if (!NIL_P(ypixel)) (void)NUM2UINT(ypixel);
896
+ if (!GetConsoleScreenBufferInfo(wh, &ws)) {
897
+ rb_syserr_fail(LAST_ERROR, "GetConsoleScreenBufferInfo");
898
+ }
899
+ oldsize = ws.dwSize;
900
+ oldwindow = ws.srWindow;
901
+ if (ws.srWindow.Right + 1 < newcol) {
902
+ ws.dwSize.X = newcol;
903
+ }
904
+ if (ws.dwSize.Y < newrow) {
905
+ ws.dwSize.Y = newrow;
906
+ }
907
+ /* expand screen buffer first if needed */
908
+ if (!SetConsoleScreenBufferSize(wh, ws.dwSize)) {
909
+ rb_syserr_fail(LAST_ERROR, "SetConsoleScreenBufferInfo");
910
+ }
911
+ /* refresh ws for new dwMaximumWindowSize */
912
+ if (!GetConsoleScreenBufferInfo(wh, &ws)) {
913
+ rb_syserr_fail(LAST_ERROR, "GetConsoleScreenBufferInfo");
914
+ }
915
+ /* check new size before modifying buffer content */
916
+ if (newrow <= 0 || newcol <= 0 ||
917
+ newrow > ws.dwMaximumWindowSize.Y ||
918
+ newcol > ws.dwMaximumWindowSize.X) {
919
+ SetConsoleScreenBufferSize(wh, oldsize);
920
+ /* remove scrollbar if possible */
921
+ SetConsoleWindowInfo(wh, TRUE, &oldwindow);
922
+ rb_raise(rb_eArgError, "out of range winsize: [%d, %d]", newrow, newcol);
923
+ }
924
+ /* shrink screen buffer width */
925
+ ws.dwSize.X = newcol;
926
+ /* shrink screen buffer height if window height were the same */
927
+ if (oldsize.Y == ws.srWindow.Bottom - ws.srWindow.Top + 1) {
928
+ ws.dwSize.Y = newrow;
929
+ }
930
+ ws.srWindow.Left = 0;
931
+ ws.srWindow.Right = newcol - 1;
932
+ ws.srWindow.Bottom = ws.srWindow.Top + newrow -1;
933
+ if (ws.dwCursorPosition.Y > ws.srWindow.Bottom) {
934
+ console_scroll(io, ws.dwCursorPosition.Y - ws.srWindow.Bottom);
935
+ ws.dwCursorPosition.Y = ws.srWindow.Bottom;
936
+ console_goto(io, INT2FIX(ws.dwCursorPosition.Y), INT2FIX(ws.dwCursorPosition.X));
937
+ }
938
+ if (ws.srWindow.Bottom > ws.dwSize.Y - 1) {
939
+ console_scroll(io, ws.srWindow.Bottom - (ws.dwSize.Y - 1));
940
+ ws.dwCursorPosition.Y -= ws.srWindow.Bottom - (ws.dwSize.Y - 1);
941
+ console_goto(io, INT2FIX(ws.dwCursorPosition.Y), INT2FIX(ws.dwCursorPosition.X));
942
+ ws.srWindow.Bottom = ws.dwSize.Y - 1;
943
+ }
944
+ ws.srWindow.Top = ws.srWindow.Bottom - (newrow - 1);
945
+ /* perform changes to winsize */
946
+ if (!SetConsoleWindowInfo(wh, TRUE, &ws.srWindow)) {
947
+ int last_error = LAST_ERROR;
948
+ SetConsoleScreenBufferSize(wh, oldsize);
949
+ rb_syserr_fail(last_error, "SetConsoleWindowInfo");
950
+ }
951
+ /* perform screen buffer shrinking if necessary */
952
+ if ((ws.dwSize.Y < oldsize.Y || ws.dwSize.X < oldsize.X) &&
953
+ !SetConsoleScreenBufferSize(wh, ws.dwSize)) {
954
+ rb_syserr_fail(LAST_ERROR, "SetConsoleScreenBufferInfo");
955
+ }
956
+ /* remove scrollbar if possible */
957
+ if (!SetConsoleWindowInfo(wh, TRUE, &ws.srWindow)) {
958
+ rb_syserr_fail(LAST_ERROR, "SetConsoleWindowInfo");
959
+ }
960
+ #endif
961
+ return io;
962
+ }
963
+ #endif
964
+
965
+ #ifdef _WIN32
966
+ /*
967
+ * call-seq:
968
+ * io.check_winsize_changed { ... } -> io
969
+ *
970
+ * Yields while console input events are queued.
971
+ *
972
+ * This method is Windows only.
973
+ *
974
+ * You must require 'io/console' to use this method.
975
+ */
976
+ static VALUE
977
+ console_check_winsize_changed(VALUE io)
978
+ {
979
+ HANDLE h;
980
+ DWORD num;
981
+
982
+ h = (HANDLE)rb_w32_get_osfhandle(GetReadFD(io));
983
+ while (GetNumberOfConsoleInputEvents(h, &num) && num > 0) {
984
+ INPUT_RECORD rec;
985
+ if (ReadConsoleInput(h, &rec, 1, &num)) {
986
+ if (rec.EventType == WINDOW_BUFFER_SIZE_EVENT) {
987
+ rb_yield(Qnil);
988
+ }
989
+ }
990
+ }
991
+ return io;
992
+ }
993
+ #else
994
+ #define console_check_winsize_changed rb_f_notimplement
995
+ #endif
996
+
997
+ /*
998
+ * call-seq:
999
+ * io.iflush
1000
+ *
1001
+ * Flushes input buffer in kernel.
1002
+ *
1003
+ * You must require 'io/console' to use this method.
1004
+ */
1005
+ static VALUE
1006
+ console_iflush(VALUE io)
1007
+ {
1008
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
1009
+ int fd = GetReadFD(io);
1010
+ if (tcflush(fd, TCIFLUSH)) sys_fail(io);
1011
+ #endif
1012
+
1013
+ return io;
1014
+ }
1015
+
1016
+ /*
1017
+ * call-seq:
1018
+ * io.oflush
1019
+ *
1020
+ * Flushes output buffer in kernel.
1021
+ *
1022
+ * You must require 'io/console' to use this method.
1023
+ */
1024
+ static VALUE
1025
+ console_oflush(VALUE io)
1026
+ {
1027
+ int fd = GetWriteFD(io);
1028
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
1029
+ if (tcflush(fd, TCOFLUSH)) sys_fail(io);
1030
+ #endif
1031
+ (void)fd;
1032
+ return io;
1033
+ }
1034
+
1035
+ /*
1036
+ * call-seq:
1037
+ * io.ioflush
1038
+ *
1039
+ * Flushes input and output buffers in kernel.
1040
+ *
1041
+ * You must require 'io/console' to use this method.
1042
+ */
1043
+ static VALUE
1044
+ console_ioflush(VALUE io)
1045
+ {
1046
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
1047
+ int fd1 = GetReadFD(io);
1048
+ int fd2 = GetWriteFD(io);
1049
+
1050
+ if (fd2 != -1 && fd1 != fd2) {
1051
+ if (tcflush(fd1, TCIFLUSH)) sys_fail(io);
1052
+ if (tcflush(fd2, TCOFLUSH)) sys_fail(io);
1053
+ }
1054
+ else {
1055
+ if (tcflush(fd1, TCIOFLUSH)) sys_fail(io);
1056
+ }
1057
+ #endif
1058
+
1059
+ return io;
1060
+ }
1061
+
1062
+ /*
1063
+ * call-seq:
1064
+ * io.beep
1065
+ *
1066
+ * Beeps on the output console.
1067
+ *
1068
+ * You must require 'io/console' to use this method.
1069
+ */
1070
+ static VALUE
1071
+ console_beep(VALUE io)
1072
+ {
1073
+ #ifdef _WIN32
1074
+ MessageBeep(0);
1075
+ #else
1076
+ int fd = GetWriteFD(io);
1077
+ if (write(fd, "\a", 1) < 0) sys_fail(io);
1078
+ #endif
1079
+ return io;
1080
+ }
1081
+
1082
+ static int
1083
+ mode_in_range(VALUE val, int high, const char *modename)
1084
+ {
1085
+ int mode;
1086
+ if (NIL_P(val)) return 0;
1087
+ if (!RB_INTEGER_TYPE_P(val)) {
1088
+ wrong_value:
1089
+ rb_raise(rb_eArgError, "wrong %s mode: %"PRIsVALUE, modename, val);
1090
+ }
1091
+ if ((mode = NUM2INT(val)) < 0 || mode > high) {
1092
+ goto wrong_value;
1093
+ }
1094
+ return mode;
1095
+ }
1096
+
1097
+ #if defined _WIN32
1098
+ static void
1099
+ constat_clear(HANDLE handle, WORD attr, DWORD len, COORD pos)
1100
+ {
1101
+ DWORD written;
1102
+
1103
+ FillConsoleOutputAttribute(handle, attr, len, pos, &written);
1104
+ FillConsoleOutputCharacterW(handle, L' ', len, pos, &written);
1105
+ }
1106
+
1107
+ static VALUE
1108
+ console_scroll(VALUE io, int line)
1109
+ {
1110
+ HANDLE h;
1111
+ rb_console_size_t ws;
1112
+
1113
+ h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(io));
1114
+ if (!GetConsoleScreenBufferInfo(h, &ws)) {
1115
+ rb_syserr_fail(LAST_ERROR, 0);
1116
+ }
1117
+ if (line) {
1118
+ SMALL_RECT scroll;
1119
+ COORD destination;
1120
+ CHAR_INFO fill;
1121
+ scroll.Left = 0;
1122
+ scroll.Top = line > 0 ? line : 0;
1123
+ scroll.Right = winsize_col(&ws) - 1;
1124
+ scroll.Bottom = winsize_row(&ws) - 1 + (line < 0 ? line : 0);
1125
+ destination.X = 0;
1126
+ destination.Y = line < 0 ? -line : 0;
1127
+ fill.Char.UnicodeChar = L' ';
1128
+ fill.Attributes = ws.wAttributes;
1129
+
1130
+ ScrollConsoleScreenBuffer(h, &scroll, NULL, destination, &fill);
1131
+ }
1132
+ return io;
1133
+ }
1134
+
1135
+ #define GPERF_DOWNCASE 1
1136
+ #define GPERF_CASE_STRCMP 1
1137
+ #define gperf_case_strcmp STRCASECMP
1138
+ #include "win32_vk.inc"
1139
+
1140
+ /*
1141
+ * call-seq:
1142
+ * io.pressed?(key) -> bool
1143
+ *
1144
+ * Returns +true+ if +key+ is pressed. +key+ may be a virtual key
1145
+ * code or its name (String or Symbol) with out "VK_" prefix.
1146
+ *
1147
+ * This method is Windows only.
1148
+ *
1149
+ * You must require 'io/console' to use this method.
1150
+ */
1151
+ static VALUE
1152
+ console_key_pressed_p(VALUE io, VALUE k)
1153
+ {
1154
+ int vk = -1;
1155
+
1156
+ if (FIXNUM_P(k)) {
1157
+ vk = NUM2UINT(k);
1158
+ }
1159
+ else {
1160
+ const struct vktable *t;
1161
+ const char *kn;
1162
+ if (SYMBOL_P(k)) {
1163
+ k = rb_sym2str(k);
1164
+ kn = RSTRING_PTR(k);
1165
+ }
1166
+ else {
1167
+ kn = StringValuePtr(k);
1168
+ }
1169
+ t = console_win32_vk(kn, RSTRING_LEN(k));
1170
+ if (!t || (vk = (short)t->vk) == -1) {
1171
+ rb_raise(rb_eArgError, "unknown virtual key code: % "PRIsVALUE, k);
1172
+ }
1173
+ }
1174
+ return GetKeyState(vk) & 0x80 ? Qtrue : Qfalse;
1175
+ }
1176
+ #else
1177
+ struct query_args {
1178
+ char qstr[6];
1179
+ unsigned char opt;
1180
+ };
1181
+
1182
+ static int
1183
+ direct_query(VALUE io, const struct query_args *query)
1184
+ {
1185
+ if (RB_TYPE_P(io, T_FILE)) {
1186
+ VALUE wio = rb_io_get_write_io(io);
1187
+ VALUE s = rb_str_new_cstr(query->qstr);
1188
+ rb_io_write(wio, s);
1189
+ rb_io_flush(wio);
1190
+ return 1;
1191
+ }
1192
+ return 0;
1193
+ }
1194
+
1195
+ static VALUE
1196
+ read_vt_response(VALUE io, VALUE query)
1197
+ {
1198
+ struct query_args *qargs = (struct query_args *)query;
1199
+ VALUE result, b;
1200
+ int opt = 0;
1201
+ int num = 0;
1202
+ if (qargs) {
1203
+ opt = qargs->opt;
1204
+ if (!direct_query(io, qargs)) return Qnil;
1205
+ }
1206
+ if (rb_io_getbyte(io) != INT2FIX(0x1b)) return Qnil;
1207
+ if (rb_io_getbyte(io) != INT2FIX('[')) return Qnil;
1208
+ result = rb_ary_new();
1209
+ while (!NIL_P(b = rb_io_getbyte(io))) {
1210
+ int c = NUM2UINT(b);
1211
+ if (c == ';') {
1212
+ rb_ary_push(result, INT2NUM(num));
1213
+ num = 0;
1214
+ }
1215
+ else if (ISDIGIT(c)) {
1216
+ num = num * 10 + c - '0';
1217
+ }
1218
+ else if (opt && c == opt) {
1219
+ opt = 0;
1220
+ }
1221
+ else {
1222
+ char last = (char)c;
1223
+ rb_ary_push(result, INT2NUM(num));
1224
+ b = rb_str_new(&last, 1);
1225
+ break;
1226
+ }
1227
+ }
1228
+ return rb_ary_push(result, b);
1229
+ }
1230
+
1231
+ static VALUE
1232
+ console_vt_response(int argc, VALUE *argv, VALUE io, const struct query_args *qargs)
1233
+ {
1234
+ rawmode_arg_t opts, *optp = rawmode_opt(&argc, argv, 0, 1, &opts);
1235
+ VALUE query = (VALUE)qargs;
1236
+ VALUE ret = ttymode_with_io(io, read_vt_response, query, set_rawmode, optp);
1237
+ return ret;
1238
+ }
1239
+
1240
+ static VALUE
1241
+ console_scroll(VALUE io, int line)
1242
+ {
1243
+ if (line) {
1244
+ VALUE s = rb_sprintf(CSI "%d%c", line < 0 ? -line : line,
1245
+ line < 0 ? 'T' : 'S');
1246
+ rb_io_write(io, s);
1247
+ }
1248
+ return io;
1249
+ }
1250
+
1251
+ # define console_key_pressed_p rb_f_notimplement
1252
+ #endif
1253
+
1254
+ /*
1255
+ * call-seq:
1256
+ * io.cursor -> [row, column]
1257
+ *
1258
+ * Returns the current cursor position as a two-element array of integers (row, column)
1259
+ *
1260
+ * io.cursor # => [3, 5]
1261
+ *
1262
+ * You must require 'io/console' to use this method.
1263
+ */
1264
+ static VALUE
1265
+ console_cursor_pos(VALUE io)
1266
+ {
1267
+ #ifdef _WIN32
1268
+ rb_console_size_t ws;
1269
+ int fd = GetWriteFD(io);
1270
+ if (!GetConsoleScreenBufferInfo((HANDLE)rb_w32_get_osfhandle(fd), &ws)) {
1271
+ rb_syserr_fail(LAST_ERROR, 0);
1272
+ }
1273
+ return rb_assoc_new(UINT2NUM(ws.dwCursorPosition.Y - ws.srWindow.Top), UINT2NUM(ws.dwCursorPosition.X));
1274
+ #else
1275
+ static const struct query_args query = {"\033[6n", 0};
1276
+ VALUE resp = console_vt_response(0, 0, io, &query);
1277
+ VALUE row, column, term;
1278
+ unsigned int r, c;
1279
+ if (!RB_TYPE_P(resp, T_ARRAY) || RARRAY_LEN(resp) != 3) return Qnil;
1280
+ term = RARRAY_AREF(resp, 2);
1281
+ if (!RB_TYPE_P(term, T_STRING) || RSTRING_LEN(term) != 1) return Qnil;
1282
+ if (RSTRING_PTR(term)[0] != 'R') return Qnil;
1283
+ row = RARRAY_AREF(resp, 0);
1284
+ column = RARRAY_AREF(resp, 1);
1285
+ rb_ary_resize(resp, 2);
1286
+ r = NUM2UINT(row) - 1;
1287
+ c = NUM2UINT(column) - 1;
1288
+ RARRAY_ASET(resp, 0, INT2NUM(r));
1289
+ RARRAY_ASET(resp, 1, INT2NUM(c));
1290
+ return resp;
1291
+ #endif
1292
+ }
1293
+
1294
+ /*
1295
+ * call-seq:
1296
+ * io.goto(line, column) -> io
1297
+ *
1298
+ * Set the cursor position at +line+ and +column+.
1299
+ *
1300
+ * You must require 'io/console' to use this method.
1301
+ */
1302
+ static VALUE
1303
+ console_goto(VALUE io, VALUE y, VALUE x)
1304
+ {
1305
+ #ifdef _WIN32
1306
+ HANDLE h;
1307
+ rb_console_size_t ws;
1308
+ COORD *pos = &ws.dwCursorPosition;
1309
+
1310
+ h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(io));
1311
+ if (!GetConsoleScreenBufferInfo(h, &ws)) {
1312
+ rb_syserr_fail(LAST_ERROR, 0);
1313
+ }
1314
+ pos->X = NUM2UINT(x);
1315
+ pos->Y = ws.srWindow.Top + NUM2UINT(y);
1316
+ if (!SetConsoleCursorPosition(h, *pos)) {
1317
+ rb_syserr_fail(LAST_ERROR, 0);
1318
+ }
1319
+ #else
1320
+ rb_io_write(io, rb_sprintf(CSI "%d;%dH", NUM2UINT(y)+1, NUM2UINT(x)+1));
1321
+ #endif
1322
+ return io;
1323
+ }
1324
+
1325
+ static VALUE
1326
+ console_move(VALUE io, int y, int x)
1327
+ {
1328
+ #ifdef _WIN32
1329
+ HANDLE h;
1330
+ rb_console_size_t ws;
1331
+ COORD *pos = &ws.dwCursorPosition;
1332
+
1333
+ h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(io));
1334
+ if (!GetConsoleScreenBufferInfo(h, &ws)) {
1335
+ rb_syserr_fail(LAST_ERROR, 0);
1336
+ }
1337
+ pos->X += x;
1338
+ pos->Y += y;
1339
+ if (!SetConsoleCursorPosition(h, *pos)) {
1340
+ rb_syserr_fail(LAST_ERROR, 0);
1341
+ }
1342
+ #else
1343
+ if (x || y) {
1344
+ VALUE s = rb_str_new_cstr("");
1345
+ if (y) rb_str_catf(s, CSI "%d%c", y < 0 ? -y : y, y < 0 ? 'A' : 'B');
1346
+ if (x) rb_str_catf(s, CSI "%d%c", x < 0 ? -x : x, x < 0 ? 'D' : 'C');
1347
+ rb_io_write(io, s);
1348
+ rb_io_flush(io);
1349
+ }
1350
+ #endif
1351
+ return io;
1352
+ }
1353
+
1354
+ /*
1355
+ * call-seq:
1356
+ * io.goto_column(column) -> io
1357
+ *
1358
+ * Set the cursor position at +column+ in the same line of the current
1359
+ * position.
1360
+ *
1361
+ * You must require 'io/console' to use this method.
1362
+ */
1363
+ static VALUE
1364
+ console_goto_column(VALUE io, VALUE val)
1365
+ {
1366
+ #ifdef _WIN32
1367
+ HANDLE h;
1368
+ rb_console_size_t ws;
1369
+ COORD *pos = &ws.dwCursorPosition;
1370
+
1371
+ h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(io));
1372
+ if (!GetConsoleScreenBufferInfo(h, &ws)) {
1373
+ rb_syserr_fail(LAST_ERROR, 0);
1374
+ }
1375
+ pos->X = NUM2INT(val);
1376
+ if (!SetConsoleCursorPosition(h, *pos)) {
1377
+ rb_syserr_fail(LAST_ERROR, 0);
1378
+ }
1379
+ #else
1380
+ rb_io_write(io, rb_sprintf(CSI "%dG", NUM2UINT(val)+1));
1381
+ #endif
1382
+ return io;
1383
+ }
1384
+
1385
+ /*
1386
+ * call-seq:
1387
+ * io.erase_line(mode) -> io
1388
+ *
1389
+ * Erases the line at the cursor corresponding to +mode+.
1390
+ * +mode+ may be either:
1391
+ * 0: after cursor
1392
+ * 1: before and cursor
1393
+ * 2: entire line
1394
+ *
1395
+ * You must require 'io/console' to use this method.
1396
+ */
1397
+ static VALUE
1398
+ console_erase_line(VALUE io, VALUE val)
1399
+ {
1400
+ int mode = mode_in_range(val, 2, "line erase");
1401
+ #ifdef _WIN32
1402
+ HANDLE h;
1403
+ rb_console_size_t ws;
1404
+ COORD *pos = &ws.dwCursorPosition;
1405
+ DWORD w;
1406
+
1407
+ h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(io));
1408
+ if (!GetConsoleScreenBufferInfo(h, &ws)) {
1409
+ rb_syserr_fail(LAST_ERROR, 0);
1410
+ }
1411
+ w = winsize_col(&ws);
1412
+ switch (mode) {
1413
+ case 0: /* after cursor */
1414
+ w -= pos->X;
1415
+ break;
1416
+ case 1: /* before *and* cursor */
1417
+ w = pos->X + 1;
1418
+ pos->X = 0;
1419
+ break;
1420
+ case 2: /* entire line */
1421
+ pos->X = 0;
1422
+ break;
1423
+ }
1424
+ constat_clear(h, ws.wAttributes, w, *pos);
1425
+ return io;
1426
+ #else
1427
+ rb_io_write(io, rb_sprintf(CSI "%dK", mode));
1428
+ #endif
1429
+ return io;
1430
+ }
1431
+
1432
+ /*
1433
+ * call-seq:
1434
+ * io.erase_screen(mode) -> io
1435
+ *
1436
+ * Erases the screen at the cursor corresponding to +mode+.
1437
+ * +mode+ may be either:
1438
+ * 0: after cursor
1439
+ * 1: before and cursor
1440
+ * 2: entire screen
1441
+ *
1442
+ * You must require 'io/console' to use this method.
1443
+ */
1444
+ static VALUE
1445
+ console_erase_screen(VALUE io, VALUE val)
1446
+ {
1447
+ int mode = mode_in_range(val, 3, "screen erase");
1448
+ #ifdef _WIN32
1449
+ HANDLE h;
1450
+ rb_console_size_t ws;
1451
+ COORD *pos = &ws.dwCursorPosition;
1452
+ DWORD w;
1453
+
1454
+ h = (HANDLE)rb_w32_get_osfhandle(GetWriteFD(io));
1455
+ if (!GetConsoleScreenBufferInfo(h, &ws)) {
1456
+ rb_syserr_fail(LAST_ERROR, 0);
1457
+ }
1458
+ w = winsize_col(&ws);
1459
+ switch (mode) {
1460
+ case 0: /* erase after cursor */
1461
+ w = (w * (ws.srWindow.Bottom - pos->Y + 1) - pos->X);
1462
+ break;
1463
+ case 1: /* erase before *and* cursor */
1464
+ w = (w * (pos->Y - ws.srWindow.Top) + pos->X + 1);
1465
+ pos->X = 0;
1466
+ pos->Y = ws.srWindow.Top;
1467
+ break;
1468
+ case 2: /* erase entire screen */
1469
+ w = (w * winsize_row(&ws));
1470
+ pos->X = 0;
1471
+ pos->Y = ws.srWindow.Top;
1472
+ break;
1473
+ case 3: /* erase entire screen */
1474
+ w = (w * ws.dwSize.Y);
1475
+ pos->X = 0;
1476
+ pos->Y = 0;
1477
+ break;
1478
+ }
1479
+ constat_clear(h, ws.wAttributes, w, *pos);
1480
+ #else
1481
+ rb_io_write(io, rb_sprintf(CSI "%dJ", mode));
1482
+ #endif
1483
+ return io;
1484
+ }
1485
+
1486
+ /*
1487
+ * call-seq:
1488
+ * io.cursor = [line, column] -> io
1489
+ *
1490
+ * Same as <tt>io.goto(line, column)</tt>
1491
+ *
1492
+ * See IO#goto.
1493
+ *
1494
+ * You must require 'io/console' to use this method.
1495
+ */
1496
+ static VALUE
1497
+ console_cursor_set(VALUE io, VALUE cpos)
1498
+ {
1499
+ cpos = rb_convert_type(cpos, T_ARRAY, "Array", "to_ary");
1500
+ if (RARRAY_LEN(cpos) != 2) rb_raise(rb_eArgError, "expected 2D coordinate");
1501
+ return console_goto(io, RARRAY_AREF(cpos, 0), RARRAY_AREF(cpos, 1));
1502
+ }
1503
+
1504
+ /*
1505
+ * call-seq:
1506
+ * io.cursor_up(n) -> io
1507
+ *
1508
+ * Moves the cursor up +n+ lines.
1509
+ *
1510
+ * You must require 'io/console' to use this method.
1511
+ */
1512
+ static VALUE
1513
+ console_cursor_up(VALUE io, VALUE val)
1514
+ {
1515
+ return console_move(io, -NUM2INT(val), 0);
1516
+ }
1517
+
1518
+ /*
1519
+ * call-seq:
1520
+ * io.cursor_down(n) -> io
1521
+ *
1522
+ * Moves the cursor down +n+ lines.
1523
+ *
1524
+ * You must require 'io/console' to use this method.
1525
+ */
1526
+ static VALUE
1527
+ console_cursor_down(VALUE io, VALUE val)
1528
+ {
1529
+ return console_move(io, +NUM2INT(val), 0);
1530
+ }
1531
+
1532
+ /*
1533
+ * call-seq:
1534
+ * io.cursor_left(n) -> io
1535
+ *
1536
+ * Moves the cursor left +n+ columns.
1537
+ *
1538
+ * You must require 'io/console' to use this method.
1539
+ */
1540
+ static VALUE
1541
+ console_cursor_left(VALUE io, VALUE val)
1542
+ {
1543
+ return console_move(io, 0, -NUM2INT(val));
1544
+ }
1545
+
1546
+ /*
1547
+ * call-seq:
1548
+ * io.cursor_right(n) -> io
1549
+ *
1550
+ * Moves the cursor right +n+ columns.
1551
+ *
1552
+ * You must require 'io/console' to use this method.
1553
+ */
1554
+ static VALUE
1555
+ console_cursor_right(VALUE io, VALUE val)
1556
+ {
1557
+ return console_move(io, 0, +NUM2INT(val));
1558
+ }
1559
+
1560
+ /*
1561
+ * call-seq:
1562
+ * io.scroll_forward(n) -> io
1563
+ *
1564
+ * Scrolls the entire scrolls forward +n+ lines.
1565
+ *
1566
+ * You must require 'io/console' to use this method.
1567
+ */
1568
+ static VALUE
1569
+ console_scroll_forward(VALUE io, VALUE val)
1570
+ {
1571
+ return console_scroll(io, +NUM2INT(val));
1572
+ }
1573
+
1574
+ /*
1575
+ * call-seq:
1576
+ * io.scroll_backward(n) -> io
1577
+ *
1578
+ * Scrolls the entire scrolls backward +n+ lines.
1579
+ *
1580
+ * You must require 'io/console' to use this method.
1581
+ */
1582
+ static VALUE
1583
+ console_scroll_backward(VALUE io, VALUE val)
1584
+ {
1585
+ return console_scroll(io, -NUM2INT(val));
1586
+ }
1587
+
1588
+ /*
1589
+ * call-seq:
1590
+ * io.clear_screen -> io
1591
+ *
1592
+ * Clears the entire screen and moves the cursor top-left corner.
1593
+ *
1594
+ * You must require 'io/console' to use this method.
1595
+ */
1596
+ static VALUE
1597
+ console_clear_screen(VALUE io)
1598
+ {
1599
+ console_erase_screen(io, INT2FIX(2));
1600
+ console_goto(io, INT2FIX(0), INT2FIX(0));
1601
+ return io;
1602
+ }
1603
+
1604
+ #ifndef HAVE_RB_IO_OPEN_DESCRIPTOR
1605
+ static VALUE
1606
+ io_open_descriptor_fallback(VALUE klass, int descriptor, int mode, VALUE path, VALUE timeout, void *encoding)
1607
+ {
1608
+ VALUE arguments[2] = {
1609
+ (rb_update_max_fd(descriptor), INT2NUM(descriptor)),
1610
+ INT2FIX(mode),
1611
+ };
1612
+
1613
+ VALUE self = rb_class_new_instance(2, arguments, klass);
1614
+
1615
+ rb_io_t *fptr;
1616
+ GetOpenFile(self, fptr);
1617
+ fptr->pathv = path;
1618
+ fptr->mode |= mode;
1619
+
1620
+ return self;
1621
+ }
1622
+ #define rb_io_open_descriptor io_open_descriptor_fallback
1623
+ #endif
1624
+
1625
+ #ifndef HAVE_RB_IO_CLOSED_P
1626
+ static VALUE
1627
+ rb_io_closed_p(VALUE io)
1628
+ {
1629
+ rb_io_t *fptr = RFILE(io)->fptr;
1630
+ return fptr->fd == -1 ? Qtrue : Qfalse;
1631
+ }
1632
+ #endif
1633
+
1634
+ #if defined(RB_EXT_RACTOR_SAFE) && defined(HAVE_RB_RACTOR_LOCAL_STORAGE_VALUE_NEWKEY)
1635
+ # define USE_RACTOR_STORAGE 1
1636
+ #else
1637
+ # define USE_RACTOR_STORAGE 0
1638
+ #endif
1639
+
1640
+ #if USE_RACTOR_STORAGE
1641
+ #include "ruby/ractor.h"
1642
+ static rb_ractor_local_key_t key_console_dev;
1643
+
1644
+ static bool
1645
+ console_dev_get(VALUE klass, VALUE *dev)
1646
+ {
1647
+ return rb_ractor_local_storage_value_lookup(key_console_dev, dev);
1648
+ }
1649
+
1650
+ static void
1651
+ console_dev_set(VALUE klass, VALUE value)
1652
+ {
1653
+ rb_ractor_local_storage_value_set(key_console_dev, value);
1654
+ }
1655
+
1656
+ static void
1657
+ console_dev_remove(VALUE klass)
1658
+ {
1659
+ console_dev_set(klass, Qnil);
1660
+ }
1661
+
1662
+ #else
1663
+
1664
+ static ID id_console;
1665
+
1666
+ static int
1667
+ console_dev_get(VALUE klass, VALUE *dev)
1668
+ {
1669
+ if (rb_const_defined(klass, id_console)) {
1670
+ *dev = rb_const_get(klass, id_console);
1671
+ return 1;
1672
+ }
1673
+ return 0;
1674
+ }
1675
+
1676
+ static void
1677
+ console_dev_set(VALUE klass, VALUE value)
1678
+ {
1679
+ rb_const_set(klass, id_console, value);
1680
+ }
1681
+
1682
+ static void
1683
+ console_dev_remove(VALUE klass)
1684
+ {
1685
+ rb_const_remove(klass, id_console);
1686
+ }
1687
+
1688
+ #endif
1689
+
1690
+ /*
1691
+ * call-seq:
1692
+ * IO.console -> #<File:/dev/tty>
1693
+ * IO.console(sym, *args)
1694
+ *
1695
+ * Returns an File instance opened console.
1696
+ *
1697
+ * If +sym+ is given, it will be sent to the opened console with
1698
+ * +args+ and the result will be returned instead of the console IO
1699
+ * itself.
1700
+ *
1701
+ * You must require 'io/console' to use this method.
1702
+ */
1703
+ static VALUE
1704
+ console_dev(int argc, VALUE *argv, VALUE klass)
1705
+ {
1706
+ VALUE con = 0;
1707
+ VALUE sym = 0;
1708
+
1709
+ if (argc) {
1710
+ Check_Type(sym = argv[0], T_SYMBOL);
1711
+ }
1712
+
1713
+ // Force the class to be File.
1714
+ if (klass == rb_cIO) klass = rb_cFile;
1715
+
1716
+ if (console_dev_get(klass, &con)) {
1717
+ if (!RB_TYPE_P(con, T_FILE) || RTEST(rb_io_closed_p(con))) {
1718
+ console_dev_remove(klass);
1719
+ con = 0;
1720
+ }
1721
+ }
1722
+
1723
+ if (sym) {
1724
+ if (sym == ID2SYM(id_close) && argc == 1) {
1725
+ if (con) {
1726
+ rb_io_close(con);
1727
+ console_dev_remove(klass);
1728
+ con = 0;
1729
+ }
1730
+ return Qnil;
1731
+ }
1732
+ }
1733
+
1734
+ if (!con) {
1735
+ #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H || defined HAVE_SGTTY_H
1736
+ # define CONSOLE_DEVICE "/dev/tty"
1737
+ #elif defined _WIN32
1738
+ # define CONSOLE_DEVICE "con$"
1739
+ # define CONSOLE_DEVICE_FOR_READING "conin$"
1740
+ # define CONSOLE_DEVICE_FOR_WRITING "conout$"
1741
+ #endif
1742
+ #ifndef CONSOLE_DEVICE_FOR_READING
1743
+ # define CONSOLE_DEVICE_FOR_READING CONSOLE_DEVICE
1744
+ #endif
1745
+ #ifdef CONSOLE_DEVICE_FOR_WRITING
1746
+ VALUE out;
1747
+ #endif
1748
+ int fd;
1749
+ VALUE path = rb_obj_freeze(rb_str_new2(CONSOLE_DEVICE));
1750
+
1751
+ #ifdef CONSOLE_DEVICE_FOR_WRITING
1752
+ fd = rb_cloexec_open(CONSOLE_DEVICE_FOR_WRITING, O_RDWR, 0);
1753
+ if (fd < 0) return Qnil;
1754
+ out = rb_io_open_descriptor(klass, fd, FMODE_WRITABLE | FMODE_SYNC, path, Qnil, NULL);
1755
+ #endif
1756
+ fd = rb_cloexec_open(CONSOLE_DEVICE_FOR_READING, O_RDWR, 0);
1757
+ if (fd < 0) {
1758
+ #ifdef CONSOLE_DEVICE_FOR_WRITING
1759
+ rb_io_close(out);
1760
+ #endif
1761
+ return Qnil;
1762
+ }
1763
+
1764
+ con = rb_io_open_descriptor(klass, fd, FMODE_READWRITE | FMODE_SYNC, path, Qnil, NULL);
1765
+ #ifdef CONSOLE_DEVICE_FOR_WRITING
1766
+ rb_io_set_write_io(con, out);
1767
+ #endif
1768
+ console_dev_set(klass, con);
1769
+ }
1770
+
1771
+ if (sym) {
1772
+ return rb_f_send(argc, argv, con);
1773
+ }
1774
+
1775
+ return con;
1776
+ }
1777
+
1778
+ /*
1779
+ * call-seq:
1780
+ * io.getch(min: nil, time: nil, intr: nil) -> char
1781
+ *
1782
+ * See IO#getch.
1783
+ */
1784
+ static VALUE
1785
+ io_getch(int argc, VALUE *argv, VALUE io)
1786
+ {
1787
+ return rb_funcallv(io, id_getc, argc, argv);
1788
+ }
1789
+
1790
+ static VALUE
1791
+ puts_call(VALUE io)
1792
+ {
1793
+ return rb_io_write(io, rb_default_rs);
1794
+ }
1795
+
1796
+ static VALUE
1797
+ gets_call(VALUE io)
1798
+ {
1799
+ return rb_funcallv(io, id_gets, 0, 0);
1800
+ }
1801
+
1802
+ static VALUE
1803
+ getpass_call(VALUE io)
1804
+ {
1805
+ return ttymode(io, rb_io_gets, io, set_noecho, NULL);
1806
+ }
1807
+
1808
+ static void
1809
+ prompt(int argc, VALUE *argv, VALUE io)
1810
+ {
1811
+ if (argc > 0 && !NIL_P(argv[0])) {
1812
+ VALUE str = argv[0];
1813
+ StringValueCStr(str);
1814
+ rb_io_write(io, str);
1815
+ }
1816
+ }
1817
+
1818
+ static VALUE
1819
+ str_chomp(VALUE str)
1820
+ {
1821
+ if (!NIL_P(str)) {
1822
+ const VALUE rs = rb_default_rs; /* rvalue in TruffleRuby */
1823
+ rb_funcallv(str, id_chomp_bang, 1, &rs);
1824
+ }
1825
+ return str;
1826
+ }
1827
+
1828
+ /*
1829
+ * call-seq:
1830
+ * io.getpass(prompt=nil) -> string
1831
+ *
1832
+ * Reads and returns a line without echo back.
1833
+ * Prints +prompt+ unless it is +nil+.
1834
+ *
1835
+ * The newline character that terminates the
1836
+ * read line is removed from the returned string,
1837
+ * see String#chomp!.
1838
+ *
1839
+ * You must require 'io/console' to use this method.
1840
+ *
1841
+ * require 'io/console'
1842
+ * IO::console.getpass("Enter password:")
1843
+ * Enter password:
1844
+ * # => "mypassword"
1845
+ *
1846
+ */
1847
+ static VALUE
1848
+ console_getpass(int argc, VALUE *argv, VALUE io)
1849
+ {
1850
+ VALUE str, wio;
1851
+
1852
+ rb_check_arity(argc, 0, 1);
1853
+ wio = rb_io_get_write_io(io);
1854
+ if (wio == io && io == rb_stdin) wio = rb_stderr;
1855
+ prompt(argc, argv, wio);
1856
+ rb_io_flush(wio);
1857
+ str = rb_ensure(getpass_call, io, puts_call, wio);
1858
+ return str_chomp(str);
1859
+ }
1860
+
1861
+ /*
1862
+ * call-seq:
1863
+ * io.getpass(prompt=nil) -> string
1864
+ *
1865
+ * See IO#getpass.
1866
+ */
1867
+ static VALUE
1868
+ io_getpass(int argc, VALUE *argv, VALUE io)
1869
+ {
1870
+ VALUE str;
1871
+
1872
+ rb_check_arity(argc, 0, 1);
1873
+ prompt(argc, argv, io);
1874
+ rb_check_funcall(io, id_flush, 0, 0);
1875
+ str = rb_ensure(gets_call, io, puts_call, io);
1876
+ return str_chomp(str);
1877
+ }
1878
+
1879
+ #if defined(_WIN32) || defined(HAVE_TTYNAME_R) || defined(HAVE_TTYNAME)
1880
+ /*
1881
+ * call-seq:
1882
+ * io.ttyname -> string or nil
1883
+ *
1884
+ * Returns name of associated terminal (tty) if +io+ is not a tty.
1885
+ * Returns +nil+ otherwise.
1886
+ */
1887
+ static VALUE
1888
+ console_ttyname(VALUE io)
1889
+ {
1890
+ int fd = rb_io_descriptor(io);
1891
+ if (!isatty(fd)) return Qnil;
1892
+ # if defined _WIN32
1893
+ return rb_usascii_str_new_lit("con");
1894
+ # elif defined HAVE_TTYNAME_R
1895
+ {
1896
+ char termname[1024], *tn = termname;
1897
+ size_t size = sizeof(termname);
1898
+ int e;
1899
+ if (ttyname_r(fd, tn, size) == 0)
1900
+ return rb_interned_str_cstr(tn);
1901
+ if ((e = errno) == ERANGE) {
1902
+ VALUE s = rb_str_new(0, size);
1903
+ while (1) {
1904
+ tn = RSTRING_PTR(s);
1905
+ size = rb_str_capacity(s);
1906
+ if (ttyname_r(fd, tn, size) == 0) {
1907
+ return rb_str_to_interned_str(rb_str_resize(s, strlen(tn)));
1908
+ }
1909
+ if ((e = errno) != ERANGE) break;
1910
+ if ((size *= 2) >= INT_MAX/2) break;
1911
+ rb_str_resize(s, size);
1912
+ }
1913
+ }
1914
+ rb_syserr_fail_str(e, rb_sprintf("ttyname_r(%d)", fd));
1915
+ UNREACHABLE_RETURN(Qnil);
1916
+ }
1917
+ # elif defined HAVE_TTYNAME
1918
+ {
1919
+ const char *tn = ttyname(fd);
1920
+ if (!tn) {
1921
+ int e = errno;
1922
+ rb_syserr_fail_str(e, rb_sprintf("ttyname(%d)", fd));
1923
+ }
1924
+ return rb_interned_str_cstr(tn);
1925
+ }
1926
+ # else
1927
+ # error No ttyname function
1928
+ # endif
1929
+ }
1930
+ #else
1931
+ # define console_ttyname rb_f_notimplement
1932
+ #endif
1933
+
1934
+ /*
1935
+ * IO console methods
1936
+ */
1937
+ void
1938
+ Init_console(void)
1939
+ {
1940
+ #if USE_RACTOR_STORAGE
1941
+ RB_EXT_RACTOR_SAFE(true);
1942
+ #endif
1943
+
1944
+ #undef rb_intern
1945
+ #if USE_RACTOR_STORAGE
1946
+ key_console_dev = rb_ractor_local_storage_value_newkey();
1947
+ #else
1948
+ id_console = rb_intern("console");
1949
+ #endif
1950
+ id_getc = rb_intern("getc");
1951
+ id_gets = rb_intern("gets");
1952
+ id_flush = rb_intern("flush");
1953
+ id_chomp_bang = rb_intern("chomp!");
1954
+ id_close = rb_intern("close");
1955
+ #define init_rawmode_opt_id(name) \
1956
+ rawmode_opt_ids[kwd_##name] = rb_intern(#name)
1957
+ init_rawmode_opt_id(min);
1958
+ init_rawmode_opt_id(time);
1959
+ init_rawmode_opt_id(intr);
1960
+ #ifndef HAVE_RB_F_SEND
1961
+ id___send__ = rb_intern("__send__");
1962
+ #endif
1963
+ InitVM(console);
1964
+ }
1965
+
1966
+ void
1967
+ InitVM_console(void)
1968
+ {
1969
+ rb_define_method(rb_cIO, "raw", console_raw, -1);
1970
+ rb_define_method(rb_cIO, "raw!", console_set_raw, -1);
1971
+ rb_define_method(rb_cIO, "cooked", console_cooked, 0);
1972
+ rb_define_method(rb_cIO, "cooked!", console_set_cooked, 0);
1973
+ rb_define_method(rb_cIO, "getch", console_getch, -1);
1974
+ rb_define_method(rb_cIO, "echo=", console_set_echo, 1);
1975
+ rb_define_method(rb_cIO, "echo?", console_echo_p, 0);
1976
+ rb_define_method(rb_cIO, "console_mode", console_conmode_get, 0);
1977
+ rb_define_method(rb_cIO, "console_mode=", console_conmode_set, 1);
1978
+ rb_define_method(rb_cIO, "noecho", console_noecho, 0);
1979
+ rb_define_method(rb_cIO, "winsize", console_winsize, 0);
1980
+ rb_define_method(rb_cIO, "winsize=", console_set_winsize, 1);
1981
+ rb_define_method(rb_cIO, "iflush", console_iflush, 0);
1982
+ rb_define_method(rb_cIO, "oflush", console_oflush, 0);
1983
+ rb_define_method(rb_cIO, "ioflush", console_ioflush, 0);
1984
+ rb_define_method(rb_cIO, "beep", console_beep, 0);
1985
+ rb_define_method(rb_cIO, "goto", console_goto, 2);
1986
+ rb_define_method(rb_cIO, "cursor", console_cursor_pos, 0);
1987
+ rb_define_method(rb_cIO, "cursor=", console_cursor_set, 1);
1988
+ rb_define_method(rb_cIO, "cursor_up", console_cursor_up, 1);
1989
+ rb_define_method(rb_cIO, "cursor_down", console_cursor_down, 1);
1990
+ rb_define_method(rb_cIO, "cursor_left", console_cursor_left, 1);
1991
+ rb_define_method(rb_cIO, "cursor_right", console_cursor_right, 1);
1992
+ rb_define_method(rb_cIO, "goto_column", console_goto_column, 1);
1993
+ rb_define_method(rb_cIO, "erase_line", console_erase_line, 1);
1994
+ rb_define_method(rb_cIO, "erase_screen", console_erase_screen, 1);
1995
+ rb_define_method(rb_cIO, "scroll_forward", console_scroll_forward, 1);
1996
+ rb_define_method(rb_cIO, "scroll_backward", console_scroll_backward, 1);
1997
+ rb_define_method(rb_cIO, "clear_screen", console_clear_screen, 0);
1998
+ rb_define_method(rb_cIO, "pressed?", console_key_pressed_p, 1);
1999
+ rb_define_method(rb_cIO, "check_winsize_changed", console_check_winsize_changed, 0);
2000
+ rb_define_method(rb_cIO, "getpass", console_getpass, -1);
2001
+ rb_define_method(rb_cIO, "ttyname", console_ttyname, 0);
2002
+ rb_define_singleton_method(rb_cIO, "console", console_dev, -1);
2003
+ {
2004
+ /* :stopdoc: */
2005
+ VALUE mReadable = rb_define_module_under(rb_cIO, "generic_readable");
2006
+ /* :startdoc: */
2007
+ rb_define_method(mReadable, "getch", io_getch, -1);
2008
+ rb_define_method(mReadable, "getpass", io_getpass, -1);
2009
+ }
2010
+ {
2011
+ /* :stopdoc: */
2012
+ cConmode = rb_define_class_under(rb_cIO, "ConsoleMode", rb_cObject);
2013
+ rb_define_const(cConmode, "VERSION", rb_obj_freeze(rb_str_new_cstr(IO_CONSOLE_VERSION)));
2014
+ rb_define_alloc_func(cConmode, conmode_alloc);
2015
+ rb_undef_method(cConmode, "initialize");
2016
+ rb_define_method(cConmode, "initialize_copy", conmode_init_copy, 1);
2017
+ rb_define_method(cConmode, "echo=", conmode_set_echo, 1);
2018
+ rb_define_method(cConmode, "raw!", conmode_set_raw, -1);
2019
+ rb_define_method(cConmode, "raw", conmode_raw_new, -1);
2020
+ /* :startdoc: */
2021
+ }
2022
+ }