Skip to content

Instantly share code, notes, and snippets.

@dylanegan
Created September 10, 2009 02:35
Show Gist options
  • Save dylanegan/184254 to your computer and use it in GitHub Desktop.
Save dylanegan/184254 to your computer and use it in GitHub Desktop.
>> yaml = StandardError.new("foo").to_yaml
=> "--- !ruby/exception:StandardError \nmessage: foo\n"
>> error = YAML.load(yaml)
=> #<StandardError: StandardError>
>> error.message
=> "StandardError"
>> error.to_yaml
=> "--- !ruby/exception:StandardError \nmessage: StandardError\nmesg: foo\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment