Skip to content

FrozenError: can't modify frozen Hash correct way #381

Description

@ua0zeh

/lib/ruby/gems/4.0.0/gems/vault-0.19.0/lib/vault.rb:25
before 24 OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.tap do |opts|
after 24 OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.dup.tap do |opts|
no error
[1] pry(main)> require 'vault'
FrozenError: can't modify frozen Hash: {verify_mode: 1, verify_hostname: true, options: 2147614800} (FrozenError)

24 OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.dup.tap do |opts|
25 opts[:options] &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
26 opts[:options] |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
27 opts[:options] |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
28 opts[:options] |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
29 end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions