wspurgin / rspec-sidekiq

RSpec for Sidekiq
https://github.com/wspurgin/rspec-sidekiq
Other
662 stars 133 forks source link

Add frozen_string_literal: true everywhere #220

Closed ericproulx closed 5 months ago

ericproulx commented 6 months ago

Since Ruby 3.4 will consider String literals in files without a frozen_string_literal comment as if they were frozen, I took the opportunity to add its.

wspurgin commented 6 months ago

Thanks Eric! As suspected (since this is a rather old gem), we have a lot of string mutating that we're doing. If you're up for taking a crack at the substantial refactor, feel free to get cracking on it.

:bulb: Of course, the easier first step might be to put frozen_string_literal: false in any place (mostly specs) where it's currently not compatible with frozen string literals.

Either way, thanks for suggesting the changes!

ericproulx commented 6 months ago

Thanks Eric! As suspected (since this is a rather old gem), we have a lot of string mutating that we're doing. If you're up for taking a crack at the substantial refactor, feel free to get cracking on it.

💡 Of course, the easier first step might be to put frozen_string_literal: false in any place (mostly specs) where it's currently not compatible with frozen string literals.

Either way, thanks for suggesting the changes!

I've fixed the issue. I don't know why it was only on 2.7.

ericproulx commented 5 months ago

@wspurgin I ran the workflow on my fork and everything is green. I've added a few things along the way