[macruby-changes] [MacRuby/MacRuby] a89c32: in Hash#update, checks first whether receiver is f...
noreply at github.com
noreply at github.com
Thu Sep 29 17:57:44 PDT 2011
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: a89c327a0ae611b0f6c94200aeb486d3d8544088
https://github.com/MacRuby/MacRuby/commit/a89c327a0ae611b0f6c94200aeb486d3d8544088
Author: Watson <watson1978 at gmail.com>
Date: 2011-09-29 (Thu, 29 Sep 2011)
Changed paths:
M hash.c
Log Message:
-----------
in Hash#update, checks first whether receiver is frozen.
Test Script:
----
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
hash = {}
obj = Object.new
def obj.to_hash()
raise Exception, "should not invoke #to_hash"
end
hash.freeze
assert_raise(RuntimeError){ hash.update(obj) }
More information about the macruby-changes
mailing list