mruby-socket: fixed raising RuntimeError from #accept; #6554

In mruby, bare `raise` in rescue clause does not re-raise the last
exception. You should explicitly specify the exception.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-06-14 01:56:43 +09:00
parent 12c124e1d4
commit bf0f37833d
+2 -2
View File
@@ -280,9 +280,9 @@ class TCPServer < TCPSocket
TCPSocket._new_with_prelude(fd, "r+") {
@init_with_fd = true
}
rescue
rescue => e
IO._sysclose(fd) rescue nil
raise
raise e
end
end