Skip to content

Commit

Permalink
Merge pull request #358 from mvz/fix-new-rubocop-offenses
Browse files Browse the repository at this point in the history
Handle latest RuboCop offenses
  • Loading branch information
mvz committed Apr 19, 2024
2 parents 75eebc3 + 6524e4a commit cf24f1e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gir_ffi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake-manifest", "~> 0.2.0"
spec.add_development_dependency "rexml", "~> 3.0"
spec.add_development_dependency "rspec-mocks", "~> 3.5"
spec.add_development_dependency "rubocop", "~> 1.59"
spec.add_development_dependency "rubocop", "~> 1.63"
spec.add_development_dependency "rubocop-minitest", "~> 0.35.0"
spec.add_development_dependency "rubocop-packaging", "~> 0.5.2"
spec.add_development_dependency "rubocop-performance", "~> 1.20"
Expand Down
2 changes: 1 addition & 1 deletion test/ffi-glib/array_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

it "iterates over the values" do
a = []
@arr.each { |v| a << v }
@arr.each { |v| a << v } # rubocop:disable Style/MapIntoArray

assert_equal [1, 2, 3], a
end
Expand Down
2 changes: 1 addition & 1 deletion test/ffi-glib/ptr_array_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
GLib::PtrArray.add arr, "test3"

a = []
arr.each { |v| a << v }
arr.each { |v| a << v } # rubocop:disable Style/MapIntoArray

assert_equal %w[test1 test2 test3], a
end
Expand Down
2 changes: 1 addition & 1 deletion test/ffi-gobject_introspection/strv_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

strv = GObjectIntrospection::Strv.new block
arr = []
strv.each do |str|
strv.each do |str| # rubocop:disable Style/MapIntoArray
arr << str
end

Expand Down
2 changes: 1 addition & 1 deletion test/gir_ffi/sized_array_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

sarr = GirFFI::SizedArray.new :utf8, 3, block
arr = []
sarr.each do |str|
sarr.each do |str| # rubocop:disable Style/MapIntoArray
arr << str
end

Expand Down
4 changes: 2 additions & 2 deletions test/gir_ffi/zero_terminated_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
it "yields each element" do
zt = GirFFI::ZeroTerminated.from :int32, [1, 2, 3]
arr = []
zt.each do |int|
zt.each do |int| # rubocop:disable Style/MapIntoArray
arr << int
end
_(arr).must_equal [1, 2, 3]
Expand All @@ -60,7 +60,7 @@
it "works for :int8" do
zt = GirFFI::ZeroTerminated.from :int8, [1, 2, 3]
arr = []
zt.each do |int|
zt.each do |int| # rubocop:disable Style/MapIntoArray
arr << int
end
_(arr).must_equal [1, 2, 3]
Expand Down

0 comments on commit cf24f1e

Please sign in to comment.