summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2014-11-25 16:26:34 +0900
committerTomoyuki Sahara <[email protected]>2014-11-25 16:26:34 +0900
commitd1fee5892adb23565fddd9f8e762cc4ca8fd8cb3 (patch)
tree45d6dc37af228b7b775bb7eb8bc678014c6a2f69
parente7cd0244986a7ae33301e5fa8356ab26171f6190 (diff)
downloadmruby-d1fee5892adb23565fddd9f8e762cc4ca8fd8cb3.tar.gz
mruby-d1fee5892adb23565fddd9f8e762cc4ca8fd8cb3.zip
IO.sysopen does retry. closes #26.
-rw-r--r--mrblib/file.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/mrblib/file.rb b/mrblib/file.rb
index 18383f303..aa0981930 100644
--- a/mrblib/file.rb
+++ b/mrblib/file.rb
@@ -13,14 +13,7 @@ class File < IO
super(fd_or_path, mode)
else
@path = fd_or_path
- begin
- fd = IO.sysopen(@path, mode, perm)
- rescue RuntimeError => e
- raise FileError, "Could not open file (#{e})"
- rescue Errno::EMFILE, Errno::ENFILE
- GC.start
- fd = IO.sysopen(@path, mode, perm)
- end
+ fd = IO.sysopen(@path, mode, perm)
super(fd, mode)
end
end