Skip to content

Commit 3173a33

Browse files
committed
RuboCop: auto-fix explicit returns
1 parent 8c1b6d7 commit 3173a33

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/truffle/socket/socket.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def self.unpack_sockaddr_in(sockaddr)
238238
_, address, port = Truffle::Socket::Foreign
239239
.unpack_sockaddr_in(sockaddr, false)
240240

241-
return port, address
241+
[port, address]
242242
rescue SocketError => e
243243
if e.message =~ /ai_family not supported/
244244
raise ArgumentError, 'not an AF_INET/AF_INET6 sockaddr'

lib/truffle/socket/truffle/foreign.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def self.getaddrinfo(host, service = nil, family = nil, socktype = nil,
166166
res = Addrinfo.new(res[:ai_next])
167167
end
168168

169-
return addrinfos
169+
addrinfos
170170
ensure
171171
hints.free if hints
172172

@@ -282,7 +282,7 @@ def self.pack_sockaddr_in(host, port, family = ::Socket::AF_UNSPEC,
282282

283283
res = Addrinfo.new(res_p.read_pointer)
284284

285-
return res[:ai_addr].read_string(res[:ai_addrlen])
285+
res[:ai_addr].read_string(res[:ai_addrlen])
286286
ensure
287287
hints.free if hints
288288

src/main/ruby/core/io.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def run
480480
end
481481

482482
@to.flush if @to.kind_of? IO
483-
return bytes
483+
bytes
484484
ensure
485485
if @from_io
486486
@from.pos = saved_pos if @offset

0 commit comments

Comments
 (0)