mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user