Skip to content

Ruby warning: "assigned but unused variable - derived_key" #27

@jessevdp

Description

@jessevdp

Hey!

It seems there's a (small) "problem" in this Gems code that's causing a Ruby warning.
(I'm seeing the warning in the output of my test suite, which uses the JOSE Gem 😄)

Would you be open to a "fix"?

Details

# reproduction_case.rb
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'jose'
end

require 'jose'
$ ruby -w reproduction_case.rb
/Users/<me>/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jose-1.2.0/lib/jose/jwe/alg_xc20p_kw.rb:64: warning: assigned but unused variable - derived_key

The seemingly unused variable:

derived_key = key

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions