Last active
August 29, 2015 14:16
-
-
Save sshao/b387db23bcde5cc97adc to your computer and use it in GitHub Desktop.
more fun with nil marshal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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