Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created December 9, 2017 00:49
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 tenderlove/37300f7c2b5f04e9f8769fa99cc1345a to your computer and use it in GitHub Desktop.
Save tenderlove/37300f7c2b5f04e9f8769fa99cc1345a to your computer and use it in GitHub Desktop.
[aaron@TC omglolwut (master)]$ cat testing.rb
require 'test_helper'
def ex
raise Minitest::Assertion, "oops!"
rescue Minitest::Assertion => e
e
end
def alloc
Minitest::Assertion.new "oops"
end
puts "allocationg"
Marshal.dump alloc
puts "exception"
Marshal.dump ex
[aaron@TC omglolwut (master)]$ be ruby -I lib:test testing.rb
allocationg
exception
Run options: --seed 19490
# Running:
Finished in 0.001595s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
[aaron@TC omglolwut (master)]$ RAILS_ENV=development be ruby -I lib:test testing.rb
allocationg
exception
testing.rb:17:in `dump': no _dump_data is defined for class Binding (TypeError)
from testing.rb:17:in `<main>'
[aaron@TC omglolwut (master)]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment