aboutsummaryrefslogtreecommitdiffstats
path: root/tool/mk_builtin_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/mk_builtin_loader.rb')
-rw-r--r--tool/mk_builtin_loader.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb
index c4f36889d6..94af846a7e 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -276,10 +276,10 @@ def mk_builtin_header file
collect_builtin(base, Ripper.sexp(code), 'top', bs = {}, inlines = {})
begin
- f = open(ofile, 'w')
- rescue Errno::EACCES
+ f = File.open(ofile, 'w')
+ rescue SystemCallError # EACCES, EPERM, EROFS, etc.
# Fall back to the current directory
- f = open(File.basename(ofile), 'w')
+ f = File.open(File.basename(ofile), 'w')
end
begin
if File::ALT_SEPARATOR