Skip to content

Instantly share code, notes, and snippets.

@wmoxam
Created April 27, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmoxam/6066b6dec9fc0be7842b to your computer and use it in GitHub Desktop.
Save wmoxam/6066b6dec9fc0be7842b to your computer and use it in GitHub Desktop.
$ irb
irb(main):001:0> str = Marshal.dump("thing")
=> "\x04\bI\"\nthing\x06:\x06ET"
irb(main):002:0> RUBY_VERSION
=> "1.9.3"
irb(main):003:0> str[0].ord
=> 4
irb(main):004:0> str[1].ord
=> 8
$ irb
irb(main):001:0> str = Marshal.dump("thing")
=> "\x04\bI\"\nthing\x06:\x06ET"
irb(main):002:0> RUBY_VERSION
=> "2.1.0"
irb(main):003:0> str[0].ord
=> 4
irb(main):004:0> str[1].ord
=> 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment