Created
October 17, 2008 17:42
-
-
Save rue/17474 to your computer and use it in GitHub Desktop.
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
| # digest_fail.rb | |
| require "digest/md5" | |
| require "spec/frozen/1.8/library/digest/md5/shared/constants.rb" | |
| d = Digest::MD5.new | |
| p :original, MD5Constants::Contents | |
| p :should_be, "a733b77177bef4e3e5d0c4e8cbcc8f6e" | |
| d << MD5Constants::Contents | |
| p :first_time | |
| p d.to_s | |
| p :nth_time | |
| 10.times { p d.to_s } | |
| ########## Output | |
| 20:33:55 ruerue@purr > vm/vm ../scratch/digest_fail.rb | |
| :original | |
| "Ipsum is simply dummy text of the printing and typesetting industry. \nLorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \nIt has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. \nIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." | |
| :should_be | |
| "a733b77177bef4e3e5d0c4e8cbcc8f6e" | |
| :first_time | |
| "a733b77177bef4e3e5d0c4e8cbcc8f6e" | |
| :nth_time | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| "d41d8cd98f00b204e9800998ecf8427e" | |
| 20:40:54 ruerue@purr > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment