Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created January 25, 2019 17:57
Show Gist options
  • Save havenwood/3a58a863b69a9b7c2327e21610899d4b to your computer and use it in GitHub Desktop.
Save havenwood/3a58a863b69a9b7c2327e21610899d4b to your computer and use it in GitHub Desktop.
daemons = ['cron', 'apmd']
filename = 'daemons.store'
File.write filename, Marshal.dump(daemons)
if File.exist? filename
raise "`#{filename}' contains unexpected daemons: `#{Marshal.load File.read filename}'"
end
#!> RuntimeError: `daemons.store' contains unexpected daemons: `["cron", "apmd"]'
@wesley974
Copy link

What is Marshal ?

@havenwood
Copy link
Author

@wesley974
Copy link

thank's=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment