Skip to content

Commit 0e68c4a

Browse files
committed
More minor style fixes.
1 parent db86c5f commit 0e68c4a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/ruby/truffleruby/core/io.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ def nonblock=(value)
16601660
else
16611661
old_flags & ~NONBLOCK
16621662
end
1663-
fcntl(F_SETFL, new_flags) if old_flags != new_flags
1663+
fcntl(F_SETFL, new_flags) unless old_flags == new_flags
16641664
self
16651665
end
16661666

@@ -1841,7 +1841,7 @@ def read_nonblock(size, buffer = nil, exception: true)
18411841
str
18421842
when String
18431843
buffer ? buffer.replace(str) : str
1844-
else
1844+
else # EOF
18451845
if exception
18461846
raise EOFError, 'end of file reached'
18471847
else

src/main/ruby/truffleruby/core/posix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def self.read_string_nonblock(io, count, exception)
373373
string
374374
elsif TRY_AGAIN_ERRNOS.include? errno
375375
raise IO::EAGAINWaitReadable if exception
376-
return :wait_readable
376+
:wait_readable
377377
else
378378
Errno.handle_errno(errno)
379379
end

0 commit comments

Comments
 (0)