Skip to content

Instantly share code, notes, and snippets.

@samleb
Created May 10, 2010 15:55
Show Gist options
  • Select an option

  • Save samleb/396201 to your computer and use it in GitHub Desktop.

Select an option

Save samleb/396201 to your computer and use it in GitHub Desktop.
def File.write(filename, content, mode = 'w')
File.open(filename, mode) do |f|
f << content
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment