New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Useless assigns #6055
Useless assigns #6055
Changes from all commits
f61a137
d955b02
ebd3918
2dd1be9
5e88918
265f6f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,10 +328,7 @@ class RedBlackTreeRunner | |
def initialize(n = 10_000) | ||
@n = n | ||
|
||
random = Random.new(1234) # repeatable random seq | ||
@a1 = Array(Int32).new(n) { rand(99_999) } | ||
|
||
random = Random.new(4321) # repeatable random seq | ||
@a2 = Array(Int32).new(n) { rand(99_999) } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this code instead be fixed to do what it was intended to do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should, but not as a part of this PR. |
||
|
||
@tree = RedBlackTree.new | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,4 @@ OptionParser.parse! do |opts| | |
end | ||
end | ||
|
||
in_filenames = ARGV | ||
|
||
do_work ARGV, output_filename, ignore_case |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ describe "concurrent" do | |
|
||
it "re-raises errors from Fibers as ConcurrentExecutionException" do | ||
exception = expect_raises(ConcurrentExecutionException) do | ||
a, b = parallel(raising_job, raising_job) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not useless per-se. It does matter that the return type is a tuple. But it is tested in the following spec. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, this spec is not good then. |
||
parallel(raising_job, raising_job) | ||
end | ||
|
||
exception.cause.should be_a(SomeParallelJobException) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not so repeatable huh