Issue #6811 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to matz (Yukihiro Matsumoto)
Target version set to next minor


----------------------------------------
Feature #6811: File, Dir and FileUtils should have bang-versions of singleton methods that fails silently
https://bugs.ruby-lang.org/issues/6811#change-33737

Author: prijutme4ty (Ilya Vorontsov)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: 
Target version: next minor


I found that often write 
Dir.mkdir(folder) unless Dir.exist? folder
and similar code for rm, rm_rf and so on
We can simply make bang-versions like
def Dir.mkdir!(folder, permissions=0744)
  Dir.mkdir(folder, permissions) unless Dir.exist? folder
# or another alternative  Dir.mkdir(folder, permissions) rescue false
end


-- 
http://bugs.ruby-lang.org/