-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Logger#close nilable error fix #3184
Conversation
Seems like the check fails because the automatic tool thinks the code should be formatted differently. Please run |
@@ -86,4 +86,11 @@ describe "Logger" do | |||
logger.info { a = 1 } | |||
a.should eq(0) | |||
end | |||
|
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.
Pretty sure it's these two spaces alone on the line
Good catch @BlaXpirit , I ran the tool on my computer and obviously I didn't see any changes so I thought it was ok 😄 |
It would be best to not introduce a 3rd commit just with the fix. Maybe you meant to amend the commit but something went wrong.
|
Yeah, every time I type |
IO.pipe do |r, w| | ||
Logger.new(w).close | ||
w.closed?.should be_true | ||
end |
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.
Maybe test logger too?
IO.pipe do |_, io|
logger = Logger.new(io)
logger.close
logger.closed?.should be_true
io.closed?.should be_true
end
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.
But Logger itself doesn't have a closed?
method.
Oops. My bad. |
And a spec that would have revealed the bug earlier.