# Rubinius alone succeeds where others fail.

class String
alias old_hash hash
def hash
self.downcase.old_hash
end

def eql?(other)
self.hash == other.hash
end
end

require 'test/unit'

class TestCaseInsensitiveHashAccess < Test::Unit::TestCase
def test_case_insensitivity
h = {'a' => 1, 'B' => 'buzz'}
assert_equal(1, h['A'])
assert_equal('buzz', h['b'])
end
end