Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~> ruby -v
- ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin9.5.1]
- ~> file `which ruby`
- /www/bin/ruby: Mach-O 64-bit executable x86_64
- ~> irb
- >> hex = "65ce30a0bf3cc5b026ca66e884d53c69"
- => "65ce30a0bf3cc5b026ca66e884d53c69"
- >> hex[0..13].to_i(16)
- => 28655680898415813
- >> hex[0..14].to_i(16)
- => 458490894374653019
- >> hex[0..15].to_i(16)
- => 3208431024
- # WTF?!!!
- ~> ruby -v
- ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0]
- ~> file `which ruby`
- /www/bin/ruby: Mach-O 64-bit executable x86_64
- ~> irb
- irb(main):001:0> hex = "65ce30a0bf3cc5b026ca66e884d53c69"
- => "65ce30a0bf3cc5b026ca66e884d53c69"
- irb(main):002:0> hex[0..13].to_i(16)
- => 28655680898415813
- irb(main):003:0> hex[0..14].to_i(16)
- => 458490894374653019
- irb(main):004:0> hex[0..15].to_i(16)
- => 7335854309994448304
Add Comment
Please, Sign In to add comment