MagLev/maglev — pull request #224 by timfel (2013-01-28 13:25:46+00:00)
Title: IO.dup not implemented... causes error w/ ensure

```ruby
require "rubygems"
require "minitest/autorun"

class TestIODup < MiniTest::Unit::TestCase
def test_io_dup
old = STDOUT.dup
ensure
STDOUT.reopen old
end
end

# fails with 2 errors:
#
# 1) Error:
# test_io_dup(TestIODup):
# TypeError: File#reopen, first arg must be a File, String, or Socket, but was: nil
# /Users/ryan/Work/p4/zss/src/hoe/dev/maglevbug_01.rb:8:in `test_io_dup'
# /Users/ryan/Work/git/maglev/src/kernel/bootstrap/IO.rb:22:in `dup'
# /Users/ryan/Work/p4/zss/src/hoe/dev/maglevbug_01.rb:6:in `test_io_dup'
# /Users/ryan/Work/p4/zss/src/hoe/dev/maglevbug_01.rb:7:in `test_io_dup'
#
# 2) Error:
# test_io_dup(TestIODup):
# Exception: return from ensure swallowed an Exception
# /Users/ryan/Work/p4/zss/src/hoe/dev/maglevbug_01.rb:8:in `test_io_dup'
# /Users/ryan/Work/git/maglev/src/kernel/bootstrap/IO.rb:22:in `dup'
# /Users/ryan/Work/p4/zss/src/hoe/dev/maglevbug_01.rb:6:in `test_io_dup'
# /Users/ryan/Work/p4/zss/src/hoe/dev/maglevbug_01.rb:7:in `test_io_dup'
```