Modified: MacRuby/trunk/test-macruby/cases/hash_test.rb (811 => 812)
--- MacRuby/trunk/test-macruby/cases/hash_test.rb 2009-02-12 19:00:10 UTC (rev 811)
+++ MacRuby/trunk/test-macruby/cases/hash_test.rb 2009-02-12 19:06:06 UTC (rev 812)
@@ -11,10 +11,11 @@
end
# FIXME: This causes a segfault.
- it "should not modify an immutable instance" do
+ it "should not modify an immutable instance and raise a RuntimeError" do
[NSDictionary.new, NSDictionary.alloc.init].each do |hash|
- assert_raise(RuntimeError) { hash['key'] = 'value' }
assert_raise(RuntimeError) { hash.clear }
+ assert_raise(RuntimeError) { hash[:key] = :value }
+ assert_nil hash[:key]
end
end