Skip to content

Commit eac2ce4

Browse files
committed
Mark a couple unfrozen strings with + unary operator.
1 parent ab2522d commit eac2ce4

File tree

5 files changed

+21
-24
lines changed

5 files changed

+21
-24
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.2
1+
3.4.3

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ruby Foobara::Util::MINIMUM_RUBY_VERSION
66
gemspec
77

88
# Development dependencies go here
9-
gem "foobara-rubocop-rules"
9+
gem "foobara-rubocop-rules", ">= 1.0.0"
1010
gem "foobara-spec-helpers"
1111
gem "guard-rspec"
1212
gem "pry"

Gemfile.lock

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
PATH
22
remote: .
33
specs:
4-
foobara-util (0.0.12)
4+
foobara-util (1.0.0)
55

66
GEM
77
remote: https://rubygems.org/
88
specs:
99
ast (2.4.3)
1010
byebug (12.0.0)
1111
coderay (1.1.3)
12-
diff-lcs (1.6.1)
12+
diff-lcs (1.6.2)
1313
docile (1.4.1)
1414
ffi (1.17.2-x86_64-linux-gnu)
15-
foobara-rubocop-rules (0.0.9)
15+
foobara-rubocop-rules (1.0.0)
1616
rubocop
1717
rubocop-rspec
1818
foobara-spec-helpers (0.0.4)
@@ -34,8 +34,8 @@ GEM
3434
guard (~> 2.1)
3535
guard-compat (~> 1.1)
3636
rspec (>= 2.99.0, < 4.0)
37-
json (2.11.3)
38-
language_server-protocol (3.17.0.4)
37+
json (2.12.2)
38+
language_server-protocol (3.17.0.5)
3939
lint_roller (1.1.0)
4040
listen (3.9.0)
4141
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -61,39 +61,39 @@ GEM
6161
pry (>= 0.13, < 0.16)
6262
racc (1.8.1)
6363
rainbow (3.1.1)
64-
rake (13.2.1)
64+
rake (13.3.0)
6565
rb-fsevent (0.11.2)
6666
rb-inotify (0.11.1)
6767
ffi (~> 1.0)
6868
regexp_parser (2.10.0)
69-
rspec (3.13.0)
69+
rspec (3.13.1)
7070
rspec-core (~> 3.13.0)
7171
rspec-expectations (~> 3.13.0)
7272
rspec-mocks (~> 3.13.0)
73-
rspec-core (3.13.3)
73+
rspec-core (3.13.4)
7474
rspec-support (~> 3.13.0)
75-
rspec-expectations (3.13.4)
75+
rspec-expectations (3.13.5)
7676
diff-lcs (>= 1.2.0, < 2.0)
7777
rspec-support (~> 3.13.0)
7878
rspec-its (2.0.0)
7979
rspec-core (>= 3.13.0)
8080
rspec-expectations (>= 3.13.0)
81-
rspec-mocks (3.13.3)
81+
rspec-mocks (3.13.5)
8282
diff-lcs (>= 1.2.0, < 2.0)
8383
rspec-support (~> 3.13.0)
84-
rspec-support (3.13.3)
85-
rubocop (1.75.4)
84+
rspec-support (3.13.4)
85+
rubocop (1.76.0)
8686
json (~> 2.3)
8787
language_server-protocol (~> 3.17.0.2)
8888
lint_roller (~> 1.1.0)
8989
parallel (~> 1.10)
9090
parser (>= 3.3.0.2)
9191
rainbow (>= 2.2.2, < 4.0)
9292
regexp_parser (>= 2.9.3, < 3.0)
93-
rubocop-ast (>= 1.44.0, < 2.0)
93+
rubocop-ast (>= 1.45.0, < 2.0)
9494
ruby-progressbar (~> 1.7)
9595
unicode-display_width (>= 2.4.0, < 4.0)
96-
rubocop-ast (1.44.1)
96+
rubocop-ast (1.45.0)
9797
parser (>= 3.3.7.2)
9898
prism (~> 1.4)
9999
rubocop-rake (0.7.1)
@@ -119,7 +119,7 @@ PLATFORMS
119119
x86_64-linux
120120

121121
DEPENDENCIES
122-
foobara-rubocop-rules
122+
foobara-rubocop-rules (>= 1.0.0)
123123
foobara-spec-helpers
124124
foobara-util!
125125
guard-rspec

lib/foobara/util/string.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def camelize(string, upcase_first = false)
1313
string = string.to_s
1414
end
1515

16-
retval = ""
16+
retval = +""
1717

1818
string.each_char do |char|
1919
if ["_", "-"].include?(char)
@@ -61,7 +61,7 @@ def underscore(string)
6161

6262
string = string.gsub(/[-.]/, "_")
6363

64-
retval = ""
64+
retval = +""
6565
is_start = true
6666

6767
string.each_char do |char|

version.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
module Foobara
22
module Util
3-
VERSION = "0.0.12".freeze
4-
5-
local_ruby_version = File.read("#{__dir__}/.ruby-version").chomp
6-
local_ruby_version_minor = local_ruby_version[/\A(\d+\.\d+)\.\d+\z/, 1]
7-
MINIMUM_RUBY_VERSION = ">= #{local_ruby_version_minor}.0".freeze
3+
VERSION = "1.0.0".freeze
4+
MINIMUM_RUBY_VERSION = ">= 3.4.0".freeze
85
end
96
end

0 commit comments

Comments
 (0)