Skip to content

Instantly share code, notes, and snippets.

@sshao
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save sshao/b387db23bcde5cc97adc to your computer and use it in GitHub Desktop.

Select an option

Save sshao/b387db23bcde5cc97adc to your computer and use it in GitHub Desktop.
more fun with nil marshal
class User
def _dump(level)
""
end
def self._load(*args)
nil
end
end
user1 = User.new
user2 = User.new
s = "string"
arr = [user1, user2, s, s]
arr_dump = Marshal.dump(arr)
p Marshal.load(arr_dump)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment