Skip to content

Instantly share code, notes, and snippets.

@badosu
Created May 21, 2013 07:37
Show Gist options
  • Save badosu/5618124 to your computer and use it in GitHub Desktop.
Save badosu/5618124 to your computer and use it in GitHub Desktop.
❯ cat asd.rb rubinius/git/master !
require 'test/unit'
class TestFoo < Test::Unit::TestCase
def test_foo
obj1 = Object.new
obj2 = obj1.dup
def obj1.to_ary
raise
end
assert_equal([obj2], [obj1].flatten)
end
end
❯ ruby1.8 -v rubinius/git/master !
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
❯ ruby1.8 asd.rb rubinius/git/master !
Loaded suite asd
Started
E
Finished in 0.000165 seconds.
1) Error:
test_foo(TestFoo):
RuntimeError:
asd.rb:8:in `to_ary'
asd.rb:10:in `flatten'
asd.rb:10:in `test_foo'
1 tests, 0 assertions, 0 failures, 1 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment