Closed
Description
Subject of the issue
On the latest new version of Ruby git gem, I see this message:
/Users/emmasax/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/git-1.9.0/lib/git/lib.rb:663: warning: string literal in condition
This error is pointing to this line:
Line 663 in 07a1167
Looking at the error (StackOverflow describes what the warning message means here), it seems the easiest way to fix it is to change that line to:
arr_opts << '--gpg-sign' if opts[:gpg_sign] && (opts[:gpg_sign] == true || opts[:gpg_sign] == "--gpg-sign=#{opts[:gpg_sign]}")
Your environment
- Ruby git gem 1.9.0
- Ruby version 3.0.1 installed with rbenv
Steps to reproduce
Using the newest version of the git Ruby gem with Ruby 3.0.1:
$ irb
irb(main):002:0> require 'git'
/Users/emmasax/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/git-1.9.0/lib/git/lib.rb:663: warning: string literal in condition
=> true
Expected behaviour
$ irb
irb(main):002:0> require 'git'
=> true
Actual behaviour
See the Steps to reproduce
section.
Metadata
Metadata
Assignees
Labels
No labels