cybrid_api_bank_ruby 0.125.161 → 0.125.162
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +5 -5
- data/cybrid_api_bank_ruby.gemspec +1 -1
- data/lib/cybrid_api_bank_ruby/api/accounts_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/assets_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/banks_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/counterparties_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/customers_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/deposit_addresses_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/deposit_bank_accounts_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/executions_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/external_bank_accounts_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/external_wallets_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/files_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/identity_verifications_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/invoices_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/payment_instructions_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/persona_sessions_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/plans_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/prices_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/quotes_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/symbols_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/trades_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/transfers_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/workflows_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api_client.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api_error.rb +1 -1
- data/lib/cybrid_api_bank_ruby/configuration.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_association_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/activity_limit_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/activity_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/activity_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/asset_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/asset_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/asset_types_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_feature_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_supported_payout_symbols_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/compliance_check_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/compliance_check_outcome_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/compliance_check_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/compliance_decision_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/compliance_decision_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/compliance_decision_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_aliases_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/counterparty_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_aliases_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_format_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_account_details_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_counterparty_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_routing_details_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_routing_number_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/error_response_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/execution_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/execution_travel_rule_info_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_balances_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_kind_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_addresses_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_routing_details_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_environment_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/fee_association_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identification_number_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_business_associate_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_document_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_document_file_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_method_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_options_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_outcome_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_persona_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_aliases_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_pii_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/invoice_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/invoice_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_bank_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_customer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_external_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_transfer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_transfer_participant_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/payment_instruction_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/payment_instruction_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/persona_session_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/plan_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/plan_travel_rule_info_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/platform_file_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/platform_file_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_bank_account_details_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_bank_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_counterparty_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_counterparty_aliases_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_counterparty_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_counterparty_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_aliases_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_deposit_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_deposit_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_execution_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_external_wallet_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_fee_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_file_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identification_number_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_aliases_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_invoice_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_payment_instruction_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_persona_session_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_plan_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_plan_destination_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_plan_source_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_plan_travel_rule_info_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_quote_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_quote_entry_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_supported_payout_symbols_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_trade_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_transfer_participant_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_ultimate_beneficial_owner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_workflow_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_entry_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_entry_destination_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_entry_source_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/stage_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/symbol_price_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_failure_code_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_account_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_destination_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_entry_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_entry_destination_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_failure_code_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_hold_details_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_identifiers_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_participant_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_source_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/travel_rule_info_party_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_with_details_all_of_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_with_details_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflows_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/version.rb +2 -2
- data/lib/cybrid_api_bank_ruby.rb +1 -1
- data/spec/api/accounts_bank_api_spec.rb +1 -1
- data/spec/api/assets_bank_api_spec.rb +1 -1
- data/spec/api/banks_bank_api_spec.rb +1 -1
- data/spec/api/counterparties_bank_api_spec.rb +1 -1
- data/spec/api/customers_bank_api_spec.rb +1 -1
- data/spec/api/deposit_addresses_bank_api_spec.rb +1 -1
- data/spec/api/deposit_bank_accounts_bank_api_spec.rb +1 -1
- data/spec/api/executions_bank_api_spec.rb +1 -1
- data/spec/api/external_bank_accounts_bank_api_spec.rb +1 -1
- data/spec/api/external_wallets_bank_api_spec.rb +1 -1
- data/spec/api/files_bank_api_spec.rb +1 -1
- data/spec/api/identity_verifications_bank_api_spec.rb +1 -1
- data/spec/api/invoices_bank_api_spec.rb +1 -1
- data/spec/api/payment_instructions_bank_api_spec.rb +1 -1
- data/spec/api/persona_sessions_bank_api_spec.rb +1 -1
- data/spec/api/plans_bank_api_spec.rb +1 -1
- data/spec/api/prices_bank_api_spec.rb +1 -1
- data/spec/api/quotes_bank_api_spec.rb +1 -1
- data/spec/api/symbols_bank_api_spec.rb +1 -1
- data/spec/api/trades_bank_api_spec.rb +1 -1
- data/spec/api/transfers_bank_api_spec.rb +1 -1
- data/spec/api/workflows_bank_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/account_association_bank_model_spec.rb +1 -1
- data/spec/models/account_bank_model_spec.rb +1 -1
- data/spec/models/account_list_bank_model_spec.rb +1 -1
- data/spec/models/account_state_bank_model_spec.rb +1 -1
- data/spec/models/account_type_bank_model_spec.rb +1 -1
- data/spec/models/activity_limit_bank_model_spec.rb +1 -1
- data/spec/models/activity_side_bank_model_spec.rb +1 -1
- data/spec/models/activity_type_bank_model_spec.rb +1 -1
- data/spec/models/asset_bank_model_spec.rb +1 -1
- data/spec/models/asset_list_bank_model_spec.rb +1 -1
- data/spec/models/asset_types_bank_model_spec.rb +1 -1
- data/spec/models/bank_bank_model_spec.rb +1 -1
- data/spec/models/bank_feature_bank_model_spec.rb +1 -1
- data/spec/models/bank_list_bank_model_spec.rb +1 -1
- data/spec/models/bank_supported_payout_symbols_inner_bank_model_spec.rb +1 -1
- data/spec/models/bank_type_bank_model_spec.rb +1 -1
- data/spec/models/compliance_check_bank_model_spec.rb +1 -1
- data/spec/models/compliance_check_outcome_bank_model_spec.rb +1 -1
- data/spec/models/compliance_check_type_bank_model_spec.rb +1 -1
- data/spec/models/compliance_decision_bank_model_spec.rb +1 -1
- data/spec/models/compliance_decision_state_bank_model_spec.rb +1 -1
- data/spec/models/compliance_decision_type_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_address_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_aliases_inner_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_list_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_name_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_state_bank_model_spec.rb +1 -1
- data/spec/models/counterparty_type_bank_model_spec.rb +1 -1
- data/spec/models/customer_address_bank_model_spec.rb +1 -1
- data/spec/models/customer_aliases_inner_bank_model_spec.rb +1 -1
- data/spec/models/customer_bank_model_spec.rb +1 -1
- data/spec/models/customer_list_bank_model_spec.rb +1 -1
- data/spec/models/customer_name_bank_model_spec.rb +1 -1
- data/spec/models/customer_state_bank_model_spec.rb +1 -1
- data/spec/models/customer_type_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_format_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_list_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_state_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_account_details_inner_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_counterparty_address_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_list_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_routing_details_inner_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_routing_number_type_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_state_bank_model_spec.rb +1 -1
- data/spec/models/error_response_bank_model_spec.rb +1 -1
- data/spec/models/execution_bank_model_spec.rb +1 -1
- data/spec/models/execution_travel_rule_info_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_balances_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_kind_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_list_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_pii_inner_addresses_inner_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_pii_inner_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_pii_inner_routing_details_inner_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_state_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_environment_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_list_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_state_bank_model_spec.rb +1 -1
- data/spec/models/fee_association_bank_model_spec.rb +1 -1
- data/spec/models/identification_number_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_business_associate_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_document_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_document_file_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_list_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_method_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_options_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_outcome_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_persona_state_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_state_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_type_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_pii_address_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_pii_aliases_inner_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_pii_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_pii_name_bank_model_spec.rb +1 -1
- data/spec/models/invoice_bank_model_spec.rb +1 -1
- data/spec/models/invoice_list_bank_model_spec.rb +1 -1
- data/spec/models/patch_bank_bank_model_spec.rb +1 -1
- data/spec/models/patch_customer_bank_model_spec.rb +1 -1
- data/spec/models/patch_external_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/patch_transfer_bank_model_spec.rb +1 -1
- data/spec/models/patch_transfer_participant_bank_model_spec.rb +1 -1
- data/spec/models/payment_instruction_bank_model_spec.rb +1 -1
- data/spec/models/payment_instruction_list_bank_model_spec.rb +1 -1
- data/spec/models/persona_session_bank_model_spec.rb +1 -1
- data/spec/models/plan_bank_model_spec.rb +1 -1
- data/spec/models/plan_travel_rule_info_bank_model_spec.rb +1 -1
- data/spec/models/platform_file_bank_model_spec.rb +1 -1
- data/spec/models/platform_file_list_bank_model_spec.rb +1 -1
- data/spec/models/post_account_bank_model_spec.rb +1 -1
- data/spec/models/post_bank_account_details_bank_model_spec.rb +1 -1
- data/spec/models/post_bank_bank_model_spec.rb +1 -1
- data/spec/models/post_counterparty_address_bank_model_spec.rb +1 -1
- data/spec/models/post_counterparty_aliases_inner_bank_model_spec.rb +1 -1
- data/spec/models/post_counterparty_bank_model_spec.rb +1 -1
- data/spec/models/post_counterparty_name_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_address_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_aliases_inner_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_name_bank_model_spec.rb +1 -1
- data/spec/models/post_deposit_address_bank_model_spec.rb +1 -1
- data/spec/models/post_deposit_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/post_execution_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_counterparty_address_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_counterparty_name_bank_model_spec.rb +1 -1
- data/spec/models/post_external_wallet_bank_model_spec.rb +1 -1
- data/spec/models/post_fee_bank_model_spec.rb +1 -1
- data/spec/models/post_file_bank_model_spec.rb +1 -1
- data/spec/models/post_identification_number_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_address_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_aliases_inner_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_name_bank_model_spec.rb +1 -1
- data/spec/models/post_invoice_bank_model_spec.rb +1 -1
- data/spec/models/post_payment_instruction_bank_model_spec.rb +1 -1
- data/spec/models/post_persona_session_bank_model_spec.rb +1 -1
- data/spec/models/post_plan_bank_model_spec.rb +1 -1
- data/spec/models/post_plan_destination_account_bank_model_spec.rb +1 -1
- data/spec/models/post_plan_source_account_bank_model_spec.rb +1 -1
- data/spec/models/post_plan_travel_rule_info_bank_model_spec.rb +1 -1
- data/spec/models/post_quote_bank_model_spec.rb +1 -1
- data/spec/models/post_quote_entry_bank_model_spec.rb +1 -1
- data/spec/models/post_supported_payout_symbols_bank_model_spec.rb +1 -1
- data/spec/models/post_trade_bank_model_spec.rb +1 -1
- data/spec/models/post_transfer_bank_model_spec.rb +1 -1
- data/spec/models/post_transfer_participant_bank_model_spec.rb +1 -1
- data/spec/models/post_ultimate_beneficial_owner_bank_model_spec.rb +1 -1
- data/spec/models/post_workflow_bank_model_spec.rb +1 -1
- data/spec/models/quote_bank_model_spec.rb +1 -1
- data/spec/models/quote_entry_bank_model_spec.rb +1 -1
- data/spec/models/quote_entry_destination_account_bank_model_spec.rb +1 -1
- data/spec/models/quote_entry_source_account_bank_model_spec.rb +1 -1
- data/spec/models/quote_list_bank_model_spec.rb +1 -1
- data/spec/models/quote_side_bank_model_spec.rb +1 -1
- data/spec/models/quote_type_bank_model_spec.rb +1 -1
- data/spec/models/stage_bank_model_spec.rb +1 -1
- data/spec/models/symbol_price_bank_model_spec.rb +1 -1
- data/spec/models/trade_bank_model_spec.rb +1 -1
- data/spec/models/trade_failure_code_bank_model_spec.rb +1 -1
- data/spec/models/trade_list_bank_model_spec.rb +1 -1
- data/spec/models/trade_side_bank_model_spec.rb +1 -1
- data/spec/models/trade_state_bank_model_spec.rb +1 -1
- data/spec/models/trade_type_bank_model_spec.rb +1 -1
- data/spec/models/transfer_account_type_bank_model_spec.rb +1 -1
- data/spec/models/transfer_bank_model_spec.rb +1 -1
- data/spec/models/transfer_destination_account_bank_model_spec.rb +1 -1
- data/spec/models/transfer_entry_bank_model_spec.rb +1 -1
- data/spec/models/transfer_entry_destination_account_bank_model_spec.rb +1 -1
- data/spec/models/transfer_failure_code_bank_model_spec.rb +1 -1
- data/spec/models/transfer_hold_details_bank_model_spec.rb +1 -1
- data/spec/models/transfer_identifiers_inner_bank_model_spec.rb +1 -1
- data/spec/models/transfer_list_bank_model_spec.rb +1 -1
- data/spec/models/transfer_participant_bank_model_spec.rb +1 -1
- data/spec/models/transfer_side_bank_model_spec.rb +1 -1
- data/spec/models/transfer_source_account_bank_model_spec.rb +1 -1
- data/spec/models/transfer_state_bank_model_spec.rb +1 -1
- data/spec/models/transfer_type_bank_model_spec.rb +1 -1
- data/spec/models/travel_rule_info_party_bank_model_spec.rb +1 -1
- data/spec/models/workflow_bank_model_spec.rb +1 -1
- data/spec/models/workflow_state_bank_model_spec.rb +1 -1
- data/spec/models/workflow_type_bank_model_spec.rb +1 -1
- data/spec/models/workflow_with_details_all_of_bank_model_spec.rb +1 -1
- data/spec/models/workflow_with_details_bank_model_spec.rb +1 -1
- data/spec/models/workflows_list_bank_model_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/cache/stringio-3.1.8.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-12.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.5.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{stringio-3.1.7 → stringio-3.1.8}/gem_make.out +18 -18
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.8/stringio.so +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.8/.rdoc_options +5 -0
- data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/NEWS.md +31 -0
- data/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.8/docs/io.rb +3 -0
- data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/ext/stringio/stringio.c +340 -91
- data/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.8/lib/stringio.so +0 -0
- data/vendor/bundle/ruby/3.3.0/specifications/{stringio-3.1.7.gemspec → stringio-3.1.8.gemspec} +5 -5
- metadata +19 -19
- data/vendor/bundle/ruby/3.3.0/cache/stringio-3.1.7.gem +0 -0
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/stringio.so +0 -0
- data/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/.rdoc_options +0 -2
- data/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/docs/io.rb +0 -8
- data/vendor/bundle/ruby/3.3.0/gems/stringio-3.1.7/lib/stringio.so +0 -0
- /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{stringio-3.1.7 → stringio-3.1.8}/gem.build_complete +0 -0
- /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{stringio-3.1.7 → stringio-3.1.8}/mkmf.log +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/.document +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/COPYING +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/LICENSE.txt +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/README.md +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/ext/stringio/.document +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/ext/stringio/Makefile +0 -0
- /data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/ext/stringio/extconf.rb +0 -0
data/vendor/bundle/ruby/3.3.0/gems/{stringio-3.1.7 → stringio-3.1.8}/ext/stringio/stringio.c
RENAMED
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
**********************************************************************/
|
|
14
14
|
|
|
15
15
|
static const char *const
|
|
16
|
-
STRINGIO_VERSION = "3.1.
|
|
16
|
+
STRINGIO_VERSION = "3.1.8";
|
|
17
17
|
|
|
18
18
|
#include <stdbool.h>
|
|
19
19
|
|
|
20
20
|
#include "ruby.h"
|
|
21
21
|
#include "ruby/io.h"
|
|
22
22
|
#include "ruby/encoding.h"
|
|
23
|
+
#include "ruby/version.h"
|
|
23
24
|
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
|
|
24
25
|
#include <fcntl.h>
|
|
25
26
|
#elif defined(HAVE_SYS_FCNTL_H)
|
|
@@ -35,6 +36,19 @@ STRINGIO_VERSION = "3.1.7";
|
|
|
35
36
|
# define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass)
|
|
36
37
|
#endif
|
|
37
38
|
|
|
39
|
+
static inline bool
|
|
40
|
+
str_chilled_p(VALUE str)
|
|
41
|
+
{
|
|
42
|
+
#if (RUBY_API_VERSION_MAJOR == 3 && RUBY_API_VERSION_MINOR >= 4) || RUBY_API_VERSION_MAJOR >= 4
|
|
43
|
+
// Do not attempt to modify chilled strings on Ruby 3.4+
|
|
44
|
+
// RUBY_FL_USER2 == STR_CHILLED_LITERAL
|
|
45
|
+
// RUBY_FL_USER3 == STR_CHILLED_SYMBOL_TO_S
|
|
46
|
+
return FL_TEST_RAW(str, RUBY_FL_USER2 | RUBY_FL_USER3);
|
|
47
|
+
#else
|
|
48
|
+
return false;
|
|
49
|
+
#endif
|
|
50
|
+
}
|
|
51
|
+
|
|
38
52
|
#ifndef HAVE_TYPE_RB_IO_MODE_T
|
|
39
53
|
typedef int rb_io_mode_t;
|
|
40
54
|
#endif
|
|
@@ -189,6 +203,18 @@ check_modifiable(struct StringIO *ptr)
|
|
|
189
203
|
}
|
|
190
204
|
}
|
|
191
205
|
|
|
206
|
+
static inline bool
|
|
207
|
+
outside_p(struct StringIO *ptr, long pos)
|
|
208
|
+
{
|
|
209
|
+
return NIL_P(ptr->string) || pos >= RSTRING_LEN(ptr->string);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
static inline bool
|
|
213
|
+
eos_p(struct StringIO *ptr)
|
|
214
|
+
{
|
|
215
|
+
return outside_p(ptr, ptr->pos);
|
|
216
|
+
}
|
|
217
|
+
|
|
192
218
|
static VALUE
|
|
193
219
|
strio_s_allocate(VALUE klass)
|
|
194
220
|
{
|
|
@@ -199,17 +225,32 @@ strio_s_allocate(VALUE klass)
|
|
|
199
225
|
* call-seq:
|
|
200
226
|
* StringIO.new(string = '', mode = 'r+') -> new_stringio
|
|
201
227
|
*
|
|
202
|
-
* Note that +mode+ defaults to <tt>'r'</tt> if +string+ is frozen.
|
|
203
|
-
*
|
|
204
228
|
* Returns a new \StringIO instance formed from +string+ and +mode+;
|
|
205
|
-
*
|
|
229
|
+
* the instance should be closed when no longer needed:
|
|
206
230
|
*
|
|
207
|
-
* strio = StringIO.new
|
|
231
|
+
* strio = StringIO.new
|
|
232
|
+
* strio.string # => ""
|
|
233
|
+
* strio.closed_read? # => false
|
|
234
|
+
* strio.closed_write? # => false
|
|
208
235
|
* strio.close
|
|
209
236
|
*
|
|
210
|
-
*
|
|
237
|
+
* If +string+ is frozen, the default +mode+ is <tt>'r'</tt>:
|
|
211
238
|
*
|
|
212
|
-
*
|
|
239
|
+
* strio = StringIO.new('foo'.freeze)
|
|
240
|
+
* strio.string # => "foo"
|
|
241
|
+
* strio.closed_read? # => false
|
|
242
|
+
* strio.closed_write? # => true
|
|
243
|
+
* strio.close
|
|
244
|
+
*
|
|
245
|
+
* Argument +mode+ must be a valid
|
|
246
|
+
* {Access Mode}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Access+Modes],
|
|
247
|
+
* which may be a string or an integer constant:
|
|
248
|
+
*
|
|
249
|
+
* StringIO.new('foo', 'w+')
|
|
250
|
+
* StringIO.new('foo', File::RDONLY)
|
|
251
|
+
*
|
|
252
|
+
* Related: StringIO.open
|
|
253
|
+
* (passes the \StringIO object to the block; closes the object automatically on block exit).
|
|
213
254
|
*/
|
|
214
255
|
static VALUE
|
|
215
256
|
strio_initialize(int argc, VALUE *argv, VALUE self)
|
|
@@ -344,23 +385,20 @@ strio_finalize(VALUE self)
|
|
|
344
385
|
|
|
345
386
|
/*
|
|
346
387
|
* call-seq:
|
|
347
|
-
* StringIO.open(string = '', mode = 'r+')
|
|
388
|
+
* StringIO.open(string = '', mode = 'r+') -> new_stringio
|
|
389
|
+
* StringIO.open(string = '', mode = 'r+') {|strio| ... } -> object
|
|
348
390
|
*
|
|
349
|
-
*
|
|
391
|
+
* Creates new \StringIO instance by calling <tt>StringIO.new(string, mode)</tt>.
|
|
350
392
|
*
|
|
351
|
-
*
|
|
352
|
-
* see {Access Modes}[rdoc-ref:File@Access+Modes].
|
|
353
|
-
*
|
|
354
|
-
* With no block, returns the new instance:
|
|
393
|
+
* With no block given, returns the new instance:
|
|
355
394
|
*
|
|
356
395
|
* strio = StringIO.open # => #<StringIO>
|
|
357
396
|
*
|
|
358
|
-
* With a block, calls the block with the new instance
|
|
397
|
+
* With a block given, calls the block with the new instance
|
|
359
398
|
* and returns the block's value;
|
|
360
|
-
* closes the instance on block exit
|
|
399
|
+
* closes the instance on block exit:
|
|
361
400
|
*
|
|
362
|
-
* StringIO.open {|strio|
|
|
363
|
-
* # => #<StringIO>
|
|
401
|
+
* StringIO.open('foo') {|strio| strio.string.upcase } # => "FOO"
|
|
364
402
|
*
|
|
365
403
|
* Related: StringIO.new.
|
|
366
404
|
*/
|
|
@@ -386,7 +424,7 @@ strio_s_new(int argc, VALUE *argv, VALUE klass)
|
|
|
386
424
|
}
|
|
387
425
|
|
|
388
426
|
/*
|
|
389
|
-
* Returns +false
|
|
427
|
+
* Returns +false+; for compatibility with IO.
|
|
390
428
|
*/
|
|
391
429
|
static VALUE
|
|
392
430
|
strio_false(VALUE self)
|
|
@@ -396,7 +434,7 @@ strio_false(VALUE self)
|
|
|
396
434
|
}
|
|
397
435
|
|
|
398
436
|
/*
|
|
399
|
-
* Returns +nil
|
|
437
|
+
* Returns +nil+; for compatibility with IO.
|
|
400
438
|
*/
|
|
401
439
|
static VALUE
|
|
402
440
|
strio_nil(VALUE self)
|
|
@@ -406,7 +444,7 @@ strio_nil(VALUE self)
|
|
|
406
444
|
}
|
|
407
445
|
|
|
408
446
|
/*
|
|
409
|
-
* Returns
|
|
447
|
+
* Returns +self+; for compatibility with IO.
|
|
410
448
|
*/
|
|
411
449
|
static VALUE
|
|
412
450
|
strio_self(VALUE self)
|
|
@@ -416,7 +454,7 @@ strio_self(VALUE self)
|
|
|
416
454
|
}
|
|
417
455
|
|
|
418
456
|
/*
|
|
419
|
-
* Returns 0
|
|
457
|
+
* Returns 0; for compatibility with IO.
|
|
420
458
|
*/
|
|
421
459
|
static VALUE
|
|
422
460
|
strio_0(VALUE self)
|
|
@@ -476,7 +514,7 @@ strio_get_string(VALUE self)
|
|
|
476
514
|
* call-seq:
|
|
477
515
|
* string = other_string -> other_string
|
|
478
516
|
*
|
|
479
|
-
*
|
|
517
|
+
* Replaces the stored string with +other_string+, and sets the position to zero;
|
|
480
518
|
* returns +other_string+:
|
|
481
519
|
*
|
|
482
520
|
* StringIO.open('foo') do |strio|
|
|
@@ -490,7 +528,7 @@ strio_get_string(VALUE self)
|
|
|
490
528
|
* "foo"
|
|
491
529
|
* "bar"
|
|
492
530
|
*
|
|
493
|
-
* Related: StringIO#string (returns the
|
|
531
|
+
* Related: StringIO#string (returns the stored string).
|
|
494
532
|
*/
|
|
495
533
|
static VALUE
|
|
496
534
|
strio_set_string(VALUE self, VALUE string)
|
|
@@ -511,11 +549,16 @@ strio_set_string(VALUE self, VALUE string)
|
|
|
511
549
|
* call-seq:
|
|
512
550
|
* close -> nil
|
|
513
551
|
*
|
|
514
|
-
* Closes +self+ for both reading and writing
|
|
552
|
+
* Closes +self+ for both reading and writing; returns +nil+:
|
|
515
553
|
*
|
|
516
|
-
*
|
|
554
|
+
* strio = StringIO.new
|
|
555
|
+
* strio.closed? # => false
|
|
556
|
+
* strio.close # => nil
|
|
557
|
+
* strio.closed? # => true
|
|
558
|
+
* strio.read # Raises IOError: not opened for reading
|
|
559
|
+
* strio.write # Raises IOError: not opened for writing
|
|
517
560
|
*
|
|
518
|
-
* Related: StringIO#close_read, StringIO#close_write.
|
|
561
|
+
* Related: StringIO#close_read, StringIO#close_write, StringIO.closed?.
|
|
519
562
|
*/
|
|
520
563
|
static VALUE
|
|
521
564
|
strio_close(VALUE self)
|
|
@@ -529,9 +572,16 @@ strio_close(VALUE self)
|
|
|
529
572
|
* call-seq:
|
|
530
573
|
* close_read -> nil
|
|
531
574
|
*
|
|
532
|
-
* Closes +self+ for reading;
|
|
575
|
+
* Closes +self+ for reading;
|
|
576
|
+
* closed-write setting remains unchanged;
|
|
577
|
+
* returns +nil+:
|
|
533
578
|
*
|
|
534
|
-
*
|
|
579
|
+
* strio = StringIO.new
|
|
580
|
+
* strio.closed_read? # => false
|
|
581
|
+
* strio.close_read # => nil
|
|
582
|
+
* strio.closed_read? # => true
|
|
583
|
+
* strio.closed_write? # => false
|
|
584
|
+
* strio.read # Raises IOError: not opened for reading
|
|
535
585
|
*
|
|
536
586
|
* Related: StringIO#close, StringIO#close_write.
|
|
537
587
|
*/
|
|
@@ -550,11 +600,16 @@ strio_close_read(VALUE self)
|
|
|
550
600
|
* call-seq:
|
|
551
601
|
* close_write -> nil
|
|
552
602
|
*
|
|
553
|
-
* Closes +self+ for writing; closed-read setting remains unchanged
|
|
603
|
+
* Closes +self+ for writing; closed-read setting remains unchanged; returns +nil+:
|
|
554
604
|
*
|
|
555
|
-
*
|
|
605
|
+
* strio = StringIO.new
|
|
606
|
+
* strio.closed_write? # => false
|
|
607
|
+
* strio.close_write # => nil
|
|
608
|
+
* strio.closed_write? # => true
|
|
609
|
+
* strio.closed_read? # => false
|
|
610
|
+
* strio.write('foo') # Raises IOError: not opened for writing
|
|
556
611
|
*
|
|
557
|
-
* Related: StringIO#close, StringIO#close_read
|
|
612
|
+
* Related: StringIO#close, StringIO#close_read, StringIO#closed_write?.
|
|
558
613
|
*/
|
|
559
614
|
static VALUE
|
|
560
615
|
strio_close_write(VALUE self)
|
|
@@ -571,8 +626,16 @@ strio_close_write(VALUE self)
|
|
|
571
626
|
* call-seq:
|
|
572
627
|
* closed? -> true or false
|
|
573
628
|
*
|
|
574
|
-
* Returns
|
|
575
|
-
*
|
|
629
|
+
* Returns whether +self+ is closed for both reading and writing:
|
|
630
|
+
*
|
|
631
|
+
* strio = StringIO.new
|
|
632
|
+
* strio.closed? # => false # Open for reading and writing.
|
|
633
|
+
* strio.close_read
|
|
634
|
+
* strio.closed? # => false # Still open for writing.
|
|
635
|
+
* strio.close_write
|
|
636
|
+
* strio.closed? # => true # Now closed for both.
|
|
637
|
+
*
|
|
638
|
+
* Related: StringIO.closed_read?, StringIO.closed_write?.
|
|
576
639
|
*/
|
|
577
640
|
static VALUE
|
|
578
641
|
strio_closed(VALUE self)
|
|
@@ -586,7 +649,14 @@ strio_closed(VALUE self)
|
|
|
586
649
|
* call-seq:
|
|
587
650
|
* closed_read? -> true or false
|
|
588
651
|
*
|
|
589
|
-
* Returns
|
|
652
|
+
* Returns whether +self+ is closed for reading:
|
|
653
|
+
*
|
|
654
|
+
* strio = StringIO.new
|
|
655
|
+
* strio.closed_read? # => false
|
|
656
|
+
* strio.close_read
|
|
657
|
+
* strio.closed_read? # => true
|
|
658
|
+
*
|
|
659
|
+
* Related: StringIO#closed?, StringIO#closed_write?, StringIO#close_read.
|
|
590
660
|
*/
|
|
591
661
|
static VALUE
|
|
592
662
|
strio_closed_read(VALUE self)
|
|
@@ -600,7 +670,14 @@ strio_closed_read(VALUE self)
|
|
|
600
670
|
* call-seq:
|
|
601
671
|
* closed_write? -> true or false
|
|
602
672
|
*
|
|
603
|
-
* Returns
|
|
673
|
+
* Returns whether +self+ is closed for writing:
|
|
674
|
+
*
|
|
675
|
+
* strio = StringIO.new
|
|
676
|
+
* strio.closed_write? # => false
|
|
677
|
+
* strio.close_write
|
|
678
|
+
* strio.closed_write? # => true
|
|
679
|
+
*
|
|
680
|
+
* Related: StringIO#close_write, StringIO#closed?, StringIO#closed_read?.
|
|
604
681
|
*/
|
|
605
682
|
static VALUE
|
|
606
683
|
strio_closed_write(VALUE self)
|
|
@@ -614,19 +691,26 @@ static struct StringIO *
|
|
|
614
691
|
strio_to_read(VALUE self)
|
|
615
692
|
{
|
|
616
693
|
struct StringIO *ptr = readable(self);
|
|
617
|
-
if (
|
|
618
|
-
|
|
619
|
-
return NULL;
|
|
694
|
+
if (eos_p(ptr)) return NULL;
|
|
695
|
+
return ptr;
|
|
620
696
|
}
|
|
621
697
|
|
|
622
698
|
/*
|
|
623
699
|
* call-seq:
|
|
624
700
|
* eof? -> true or false
|
|
625
701
|
*
|
|
626
|
-
* Returns +
|
|
627
|
-
*
|
|
702
|
+
* Returns whether +self+ is positioned at end-of-stream:
|
|
703
|
+
*
|
|
704
|
+
* strio = StringIO.new('foo')
|
|
705
|
+
* strio.pos # => 0
|
|
706
|
+
* strio.eof? # => false
|
|
707
|
+
* strio.read # => "foo"
|
|
708
|
+
* strio.pos # => 3
|
|
709
|
+
* strio.eof? # => true
|
|
710
|
+
* strio.close_read
|
|
711
|
+
* strio.eof? # Raises IOError: not opened for reading
|
|
628
712
|
*
|
|
629
|
-
*
|
|
713
|
+
* Related: StringIO#pos.
|
|
630
714
|
*/
|
|
631
715
|
static VALUE
|
|
632
716
|
strio_eof(VALUE self)
|
|
@@ -690,7 +774,7 @@ strio_set_lineno(VALUE self, VALUE lineno)
|
|
|
690
774
|
* binmode -> self
|
|
691
775
|
*
|
|
692
776
|
* Sets the data mode in +self+ to binary mode;
|
|
693
|
-
* see {Data Mode}[
|
|
777
|
+
* see {Data Mode}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Data+Mode].
|
|
694
778
|
*
|
|
695
779
|
*/
|
|
696
780
|
static VALUE
|
|
@@ -823,7 +907,11 @@ strio_seek(int argc, VALUE *argv, VALUE self)
|
|
|
823
907
|
offset = ptr->pos;
|
|
824
908
|
break;
|
|
825
909
|
case 2:
|
|
826
|
-
|
|
910
|
+
if (NIL_P(ptr->string)) {
|
|
911
|
+
offset = 0;
|
|
912
|
+
} else {
|
|
913
|
+
offset = RSTRING_LEN(ptr->string);
|
|
914
|
+
}
|
|
827
915
|
break;
|
|
828
916
|
default:
|
|
829
917
|
error_inval("invalid whence");
|
|
@@ -856,10 +944,9 @@ strio_get_sync(VALUE self)
|
|
|
856
944
|
* call-seq:
|
|
857
945
|
* each_byte {|byte| ... } -> self
|
|
858
946
|
*
|
|
859
|
-
*
|
|
860
|
-
* see {Byte IO}[rdoc-ref:IO@Byte+IO].
|
|
947
|
+
* :include: stringio/each_byte.rdoc
|
|
861
948
|
*
|
|
862
|
-
*
|
|
949
|
+
* Related: StringIO#each_char, StringIO#each_codepoint, StringIO#each_line.
|
|
863
950
|
*/
|
|
864
951
|
static VALUE
|
|
865
952
|
strio_each_byte(VALUE self)
|
|
@@ -877,10 +964,10 @@ strio_each_byte(VALUE self)
|
|
|
877
964
|
|
|
878
965
|
/*
|
|
879
966
|
* call-seq:
|
|
880
|
-
* getc -> character or nil
|
|
967
|
+
* getc -> character, byte, or nil
|
|
968
|
+
*
|
|
969
|
+
* :include: stringio/getc.rdoc
|
|
881
970
|
*
|
|
882
|
-
* Reads and returns the next character from the stream;
|
|
883
|
-
* see {Character IO}[rdoc-ref:IO@Character+IO].
|
|
884
971
|
*/
|
|
885
972
|
static VALUE
|
|
886
973
|
strio_getc(VALUE self)
|
|
@@ -892,7 +979,7 @@ strio_getc(VALUE self)
|
|
|
892
979
|
int len;
|
|
893
980
|
char *p;
|
|
894
981
|
|
|
895
|
-
if (
|
|
982
|
+
if (eos_p(ptr)) {
|
|
896
983
|
return Qnil;
|
|
897
984
|
}
|
|
898
985
|
p = RSTRING_PTR(str)+pos;
|
|
@@ -903,17 +990,17 @@ strio_getc(VALUE self)
|
|
|
903
990
|
|
|
904
991
|
/*
|
|
905
992
|
* call-seq:
|
|
906
|
-
* getbyte ->
|
|
993
|
+
* getbyte -> integer or nil
|
|
994
|
+
*
|
|
995
|
+
* :include: stringio/getbyte.rdoc
|
|
907
996
|
*
|
|
908
|
-
* Reads and returns the next 8-bit byte from the stream;
|
|
909
|
-
* see {Byte IO}[rdoc-ref:IO@Byte+IO].
|
|
910
997
|
*/
|
|
911
998
|
static VALUE
|
|
912
999
|
strio_getbyte(VALUE self)
|
|
913
1000
|
{
|
|
914
1001
|
struct StringIO *ptr = readable(self);
|
|
915
1002
|
int c;
|
|
916
|
-
if (
|
|
1003
|
+
if (eos_p(ptr)) {
|
|
917
1004
|
return Qnil;
|
|
918
1005
|
}
|
|
919
1006
|
c = RSTRING_PTR(ptr->string)[ptr->pos++];
|
|
@@ -1082,12 +1169,11 @@ strio_readbyte(VALUE self)
|
|
|
1082
1169
|
|
|
1083
1170
|
/*
|
|
1084
1171
|
* call-seq:
|
|
1085
|
-
* each_char {|
|
|
1172
|
+
* each_char {|char| ... } -> self
|
|
1086
1173
|
*
|
|
1087
|
-
*
|
|
1088
|
-
* see {Character IO}[rdoc-ref:IO@Character+IO].
|
|
1174
|
+
* :include: stringio/each_char.rdoc
|
|
1089
1175
|
*
|
|
1090
|
-
*
|
|
1176
|
+
* Related: StringIO#each_byte, StringIO#each_codepoint, StringIO#each_line.
|
|
1091
1177
|
*/
|
|
1092
1178
|
static VALUE
|
|
1093
1179
|
strio_each_char(VALUE self)
|
|
@@ -1106,10 +1192,9 @@ strio_each_char(VALUE self)
|
|
|
1106
1192
|
* call-seq:
|
|
1107
1193
|
* each_codepoint {|codepoint| ... } -> self
|
|
1108
1194
|
*
|
|
1109
|
-
*
|
|
1110
|
-
* see {Codepoint IO}[rdoc-ref:IO@Codepoint+IO].
|
|
1195
|
+
* :include: stringio/each_codepoint.rdoc
|
|
1111
1196
|
*
|
|
1112
|
-
*
|
|
1197
|
+
* Related: StringIO#each_byte, StringIO#each_char, StringIO#each_line.
|
|
1113
1198
|
*/
|
|
1114
1199
|
static VALUE
|
|
1115
1200
|
strio_each_codepoint(VALUE self)
|
|
@@ -1343,9 +1428,8 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
|
|
|
1343
1428
|
* gets(limit, chomp: false) -> string or nil
|
|
1344
1429
|
* gets(sep, limit, chomp: false) -> string or nil
|
|
1345
1430
|
*
|
|
1346
|
-
*
|
|
1347
|
-
*
|
|
1348
|
-
* see {Line IO}[rdoc-ref:IO@Line+IO].
|
|
1431
|
+
* :include: stringio/gets.rdoc
|
|
1432
|
+
*
|
|
1349
1433
|
*/
|
|
1350
1434
|
static VALUE
|
|
1351
1435
|
strio_gets(int argc, VALUE *argv, VALUE self)
|
|
@@ -1382,15 +1466,177 @@ strio_readline(int argc, VALUE *argv, VALUE self)
|
|
|
1382
1466
|
}
|
|
1383
1467
|
|
|
1384
1468
|
/*
|
|
1469
|
+
* :markup: markdown
|
|
1470
|
+
*
|
|
1385
1471
|
* call-seq:
|
|
1386
1472
|
* each_line(sep = $/, chomp: false) {|line| ... } -> self
|
|
1387
1473
|
* each_line(limit, chomp: false) {|line| ... } -> self
|
|
1388
1474
|
* each_line(sep, limit, chomp: false) {|line| ... } -> self
|
|
1389
1475
|
*
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
*
|
|
1476
|
+
* With a block given calls the block with each remaining line (see "Position" below) in the stream;
|
|
1477
|
+
* returns `self`.
|
|
1478
|
+
*
|
|
1479
|
+
* Leaves stream position as end-of-stream.
|
|
1480
|
+
*
|
|
1481
|
+
* **No Arguments**
|
|
1482
|
+
*
|
|
1483
|
+
* With no arguments given,
|
|
1484
|
+
* reads lines using the default record separator global variable `$/`, whose initial value is `"\n"`.
|
|
1485
|
+
*
|
|
1486
|
+
* ```
|
|
1487
|
+
* strio = StringIO.new(TEXT)
|
|
1488
|
+
* strio.each_line {|line| p line }
|
|
1489
|
+
* strio.eof? # => true
|
|
1490
|
+
* ```
|
|
1491
|
+
*
|
|
1492
|
+
* Output:
|
|
1493
|
+
*
|
|
1494
|
+
* ```
|
|
1495
|
+
* "First line\n"
|
|
1496
|
+
* "Second line\n"
|
|
1497
|
+
* "\n"
|
|
1498
|
+
* "Fourth line\n"
|
|
1499
|
+
* "Fifth line\n"
|
|
1500
|
+
* ```
|
|
1501
|
+
*
|
|
1502
|
+
* **Argument `sep`**
|
|
1503
|
+
*
|
|
1504
|
+
* With only string argument `sep` given,
|
|
1505
|
+
* reads lines using that string as the record separator:
|
|
1506
|
+
*
|
|
1507
|
+
* ```
|
|
1508
|
+
* strio = StringIO.new(TEXT)
|
|
1509
|
+
* strio.each_line(' ') {|line| p line }
|
|
1510
|
+
* ```
|
|
1511
|
+
*
|
|
1512
|
+
* Output:
|
|
1513
|
+
*
|
|
1514
|
+
* ```
|
|
1515
|
+
* "First "
|
|
1516
|
+
* "line\nSecond "
|
|
1517
|
+
* "line\n\nFourth "
|
|
1518
|
+
* "line\nFifth "
|
|
1519
|
+
* "line\n"
|
|
1520
|
+
* ```
|
|
1521
|
+
*
|
|
1522
|
+
* **Argument `limit`**
|
|
1523
|
+
*
|
|
1524
|
+
* With only integer argument `limit` given,
|
|
1525
|
+
* reads lines using the default record separator global variable `$/`, whose initial value is `"\n"`;
|
|
1526
|
+
* also limits the size (in characters) of each line to the given limit:
|
|
1527
|
+
*
|
|
1528
|
+
* ```
|
|
1529
|
+
* strio = StringIO.new(TEXT)
|
|
1530
|
+
* strio.each_line(10) {|line| p line }
|
|
1531
|
+
* ```
|
|
1532
|
+
*
|
|
1533
|
+
* Output:
|
|
1534
|
+
*
|
|
1535
|
+
* ```
|
|
1536
|
+
* "First line"
|
|
1537
|
+
* "\n"
|
|
1538
|
+
* "Second lin"
|
|
1539
|
+
* "e\n"
|
|
1540
|
+
* "\n"
|
|
1541
|
+
* "Fourth lin"
|
|
1542
|
+
* "e\n"
|
|
1543
|
+
* "Fifth line"
|
|
1544
|
+
* "\n"
|
|
1545
|
+
* ```
|
|
1546
|
+
* **Arguments `sep` and `limit`**
|
|
1547
|
+
*
|
|
1548
|
+
* With arguments `sep` and `limit` both given,
|
|
1549
|
+
* honors both:
|
|
1550
|
+
*
|
|
1551
|
+
* ```
|
|
1552
|
+
* strio = StringIO.new(TEXT)
|
|
1553
|
+
* strio.each_line(' ', 10) {|line| p line }
|
|
1554
|
+
* ```
|
|
1555
|
+
*
|
|
1556
|
+
* Output:
|
|
1557
|
+
*
|
|
1558
|
+
* ```
|
|
1559
|
+
* "First "
|
|
1560
|
+
* "line\nSecon"
|
|
1561
|
+
* "d "
|
|
1562
|
+
* "line\n\nFour"
|
|
1563
|
+
* "th "
|
|
1564
|
+
* "line\nFifth"
|
|
1565
|
+
* " "
|
|
1566
|
+
* "line\n"
|
|
1567
|
+
* ```
|
|
1568
|
+
*
|
|
1569
|
+
* **Position**
|
|
1570
|
+
*
|
|
1571
|
+
* As stated above, method `each` _remaining_ line in the stream.
|
|
1572
|
+
*
|
|
1573
|
+
* In the examples above each `strio` object starts with its position at beginning-of-stream;
|
|
1574
|
+
* but in other cases the position may be anywhere (see StringIO#pos):
|
|
1575
|
+
*
|
|
1576
|
+
* ```
|
|
1577
|
+
* strio = StringIO.new(TEXT)
|
|
1578
|
+
* strio.pos = 30 # Set stream position to character 30.
|
|
1579
|
+
* strio.each_line {|line| p line }
|
|
1580
|
+
* ```
|
|
1581
|
+
*
|
|
1582
|
+
* Output:
|
|
1583
|
+
*
|
|
1584
|
+
* ```
|
|
1585
|
+
* " line\n"
|
|
1586
|
+
* "Fifth line\n"
|
|
1587
|
+
* ```
|
|
1588
|
+
*
|
|
1589
|
+
* **Special Record Separators**
|
|
1590
|
+
*
|
|
1591
|
+
* Like some methds in class `IO`, StringIO.each honors two special record separators;
|
|
1592
|
+
* see {Special Line Separators}[https://docs.ruby-lang.org/en/master/IO.html#class-IO-label-Special+Line+Separator+Values].
|
|
1593
|
+
*
|
|
1594
|
+
* ```
|
|
1595
|
+
* strio = StringIO.new(TEXT)
|
|
1596
|
+
* strio.each_line('') {|line| p line } # Read as paragraphs (separated by blank lines).
|
|
1597
|
+
* ```
|
|
1598
|
+
*
|
|
1599
|
+
* Output:
|
|
1600
|
+
*
|
|
1601
|
+
* ```
|
|
1602
|
+
* "First line\nSecond line\n\n"
|
|
1603
|
+
* "Fourth line\nFifth line\n"
|
|
1604
|
+
* ```
|
|
1605
|
+
*
|
|
1606
|
+
* ```
|
|
1607
|
+
* strio = StringIO.new(TEXT)
|
|
1608
|
+
* strio.each_line(nil) {|line| p line } # "Slurp"; read it all.
|
|
1609
|
+
* ```
|
|
1610
|
+
*
|
|
1611
|
+
* Output:
|
|
1612
|
+
*
|
|
1613
|
+
* ```
|
|
1614
|
+
* "First line\nSecond line\n\nFourth line\nFifth line\n"
|
|
1615
|
+
* ```
|
|
1616
|
+
*
|
|
1617
|
+
* **Keyword Argument `chomp`**
|
|
1618
|
+
*
|
|
1619
|
+
* With keyword argument `chomp` given as `true` (the default is `false`),
|
|
1620
|
+
* removes trailing newline (if any) from each line:
|
|
1621
|
+
*
|
|
1622
|
+
* ```
|
|
1623
|
+
* strio = StringIO.new(TEXT)
|
|
1624
|
+
* strio.each_line(chomp: true) {|line| p line }
|
|
1625
|
+
* ```
|
|
1626
|
+
*
|
|
1627
|
+
* Output:
|
|
1628
|
+
*
|
|
1629
|
+
* ```
|
|
1630
|
+
* "First line"
|
|
1631
|
+
* "Second line"
|
|
1632
|
+
* ""
|
|
1633
|
+
* "Fourth line"
|
|
1634
|
+
* "Fifth line"
|
|
1635
|
+
* ```
|
|
1636
|
+
*
|
|
1637
|
+
* With no block given, returns a new {Enumerator}[https://docs.ruby-lang.org/en/master/Enumerator.html].
|
|
1638
|
+
*
|
|
1639
|
+
* Related: StringIO.each_byte, StringIO.each_char, StringIO.each_codepoint.
|
|
1394
1640
|
*/
|
|
1395
1641
|
static VALUE
|
|
1396
1642
|
strio_each(int argc, VALUE *argv, VALUE self)
|
|
@@ -1591,10 +1837,9 @@ strio_read(int argc, VALUE *argv, VALUE self)
|
|
|
1591
1837
|
if (len < 0) {
|
|
1592
1838
|
rb_raise(rb_eArgError, "negative length %ld given", len);
|
|
1593
1839
|
}
|
|
1594
|
-
if (
|
|
1595
|
-
(NIL_P(ptr->string) || ptr->pos >= RSTRING_LEN(ptr->string))) {
|
|
1840
|
+
if (eos_p(ptr)) {
|
|
1596
1841
|
if (!NIL_P(str)) rb_str_resize(str, 0);
|
|
1597
|
-
return Qnil;
|
|
1842
|
+
return len > 0 ? Qnil : rb_str_new(0, 0);
|
|
1598
1843
|
}
|
|
1599
1844
|
binary = 1;
|
|
1600
1845
|
break;
|
|
@@ -1670,7 +1915,7 @@ strio_pread(int argc, VALUE *argv, VALUE self)
|
|
|
1670
1915
|
|
|
1671
1916
|
struct StringIO *ptr = readable(self);
|
|
1672
1917
|
|
|
1673
|
-
if (
|
|
1918
|
+
if (outside_p(ptr, offset)) {
|
|
1674
1919
|
rb_eof_error();
|
|
1675
1920
|
}
|
|
1676
1921
|
|
|
@@ -1801,12 +2046,20 @@ strio_truncate(VALUE self, VALUE len)
|
|
|
1801
2046
|
}
|
|
1802
2047
|
|
|
1803
2048
|
/*
|
|
1804
|
-
*
|
|
1805
|
-
*
|
|
2049
|
+
* call-seq:
|
|
2050
|
+
* external_encoding -> encoding or nil
|
|
2051
|
+
*
|
|
2052
|
+
* Returns an Encoding object that represents the encoding of the string;
|
|
2053
|
+
* see {Encoding}[https://docs.ruby-lang.org/en/master/Encoding.html]:
|
|
2054
|
+
*
|
|
2055
|
+
* strio = StringIO.new('foo')
|
|
2056
|
+
* strio.external_encoding # => #<Encoding:UTF-8>
|
|
2057
|
+
*
|
|
2058
|
+
* Returns +nil+ if +self+ has no string and is in write mode:
|
|
2059
|
+
*
|
|
2060
|
+
* strio = StringIO.new(nil, 'w+')
|
|
2061
|
+
* strio.external_encoding # => nil
|
|
1806
2062
|
*
|
|
1807
|
-
* Returns the Encoding object that represents the encoding of the file.
|
|
1808
|
-
* If the stream is write mode and no encoding is specified, returns
|
|
1809
|
-
* +nil+.
|
|
1810
2063
|
*/
|
|
1811
2064
|
|
|
1812
2065
|
static VALUE
|
|
@@ -1818,10 +2071,9 @@ strio_external_encoding(VALUE self)
|
|
|
1818
2071
|
|
|
1819
2072
|
/*
|
|
1820
2073
|
* call-seq:
|
|
1821
|
-
*
|
|
2074
|
+
* internal_encoding -> nil
|
|
1822
2075
|
*
|
|
1823
|
-
* Returns
|
|
1824
|
-
* specified. Otherwise returns +nil+.
|
|
2076
|
+
* Returns +nil+; for compatibility with IO.
|
|
1825
2077
|
*/
|
|
1826
2078
|
|
|
1827
2079
|
static VALUE
|
|
@@ -1864,7 +2116,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
|
|
|
1864
2116
|
}
|
|
1865
2117
|
}
|
|
1866
2118
|
ptr->enc = enc;
|
|
1867
|
-
if (!NIL_P(ptr->string) && WRITABLE(self)) {
|
|
2119
|
+
if (!NIL_P(ptr->string) && WRITABLE(self) && !str_chilled_p(ptr->string)) {
|
|
1868
2120
|
rb_enc_associate(ptr->string, enc);
|
|
1869
2121
|
}
|
|
1870
2122
|
|
|
@@ -1890,16 +2142,9 @@ strio_set_encoding_by_bom(VALUE self)
|
|
|
1890
2142
|
}
|
|
1891
2143
|
|
|
1892
2144
|
/*
|
|
1893
|
-
*
|
|
1894
|
-
* {IO}[rdoc-ref:IO];
|
|
1895
|
-
* see {IO}[rdoc-ref:IO].
|
|
1896
|
-
*
|
|
1897
|
-
* === About the Examples
|
|
1898
|
-
*
|
|
1899
|
-
* Examples on this page assume that \StringIO has been required:
|
|
1900
|
-
*
|
|
1901
|
-
* require 'stringio'
|
|
2145
|
+
* :markup: markdown
|
|
1902
2146
|
*
|
|
2147
|
+
* :include: stringio/stringio.md
|
|
1903
2148
|
*/
|
|
1904
2149
|
void
|
|
1905
2150
|
Init_stringio(void)
|
|
@@ -1907,7 +2152,7 @@ Init_stringio(void)
|
|
|
1907
2152
|
#undef rb_intern
|
|
1908
2153
|
|
|
1909
2154
|
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
|
1910
|
-
|
|
2155
|
+
rb_ext_ractor_safe(true);
|
|
1911
2156
|
#endif
|
|
1912
2157
|
|
|
1913
2158
|
VALUE StringIO = rb_define_class("StringIO", rb_cObject);
|
|
@@ -1999,7 +2244,9 @@ Init_stringio(void)
|
|
|
1999
2244
|
rb_define_method(StringIO, "set_encoding_by_bom", strio_set_encoding_by_bom, 0);
|
|
2000
2245
|
|
|
2001
2246
|
{
|
|
2247
|
+
/* :stopdoc: */
|
|
2002
2248
|
VALUE mReadable = rb_define_module_under(rb_cIO, "generic_readable");
|
|
2249
|
+
/* :startdoc: */
|
|
2003
2250
|
rb_define_method(mReadable, "readchar", strio_readchar, 0);
|
|
2004
2251
|
rb_define_method(mReadable, "readbyte", strio_readbyte, 0);
|
|
2005
2252
|
rb_define_method(mReadable, "readline", strio_readline, -1);
|
|
@@ -2009,7 +2256,9 @@ Init_stringio(void)
|
|
|
2009
2256
|
rb_include_module(StringIO, mReadable);
|
|
2010
2257
|
}
|
|
2011
2258
|
{
|
|
2259
|
+
/* :stopdoc: */
|
|
2012
2260
|
VALUE mWritable = rb_define_module_under(rb_cIO, "generic_writable");
|
|
2261
|
+
/* :startdoc: */
|
|
2013
2262
|
rb_define_method(mWritable, "<<", strio_addstr, 1);
|
|
2014
2263
|
rb_define_method(mWritable, "print", strio_print, -1);
|
|
2015
2264
|
rb_define_method(mWritable, "printf", strio_printf, -1);
|