Skip to content

Commit

Permalink
Address offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Jan 4, 2025
1 parent ad8f15f commit f1e915f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,7 @@ Naming/BinaryOperatorParameterName:
Lint/NumericOperationWithConstantResult:
Exclude:
- "spec/**/*.rb"

Style/SymbolProc:
Exclude:
- "spec/**/*.rb"
2 changes: 0 additions & 2 deletions lib/dry/effects/frame.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "fiber"

module Dry
module Effects
# Stack frame
Expand Down
4 changes: 2 additions & 2 deletions lib/dry/effects/stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def provider(effect)
find { _1.provide?(effect) }
end

def each(&block)
providers.each(&block)
def each(&)
providers.each(&)
end

def size
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/random_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
context "range" do
context "integer..integer" do
specify do
integers = Array.new(100) { rand(0..10) }
integers = Array.new(1000) { rand(0..10) }
expect(integers.min).to eql(0)
expect(integers.max).to eql(10)
end
Expand Down Expand Up @@ -68,7 +68,7 @@
end

it "relies on srand" do
fixed_seed = ::Random.new_seed
fixed_seed = Random.new_seed

prev_seed = srand(fixed_seed)
values_a = with_random { Array.new(10) { rand } }
Expand Down Expand Up @@ -113,7 +113,7 @@
end

example "other options" do
fixed_seed = ::Random.new_seed
fixed_seed = Random.new_seed
prev_seed = srand(fixed_seed)
values_a = with_random({}) { Array.new(11) { rand } }

Expand Down

0 comments on commit f1e915f

Please sign in to comment.