Project

General

Profile

Bug #10616 ยป ruby-changes.patch

alex_slynko (Alex Slynko), 12/18/2014 10:38 AM

View differences:

lib/tmpdir.rb (working copy)
81 81
  #    FileUtils.remove_entry dir
82 82
  #  end
83 83
  #
84
  def Dir.mktmpdir(prefix_suffix="d", *rest)
85
    path = Tmpname.create(prefix_suffix, *rest) {|n| mkdir(n, 0700)}
84
  def Dir.mktmpdir(prefix_suffix=nil, *rest)
85
    path = Tmpname.create(prefix_suffix || "d", *rest) {|n| mkdir(n, 0700)}
86 86
    if block_given?
87 87
      begin
88 88
        yield path