Issue #4168 has been updated by Brian Durand.

File weakref.rb added

Rdoc comments on the WeakReference class didn't get synced with the code.=
 Updated file attached that just fixes the comments.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4168

----------------------------------------
http://redmine.ruby-lang.org
cmVxdWlyZSAnbW9uaXRvcicKCiMgV2Vha1JlZmVyZW5jZSBpcyBhIGNsYXNz
IHRvIHJlcHJlc2VudCBhIHJlZmVyZW5jZSB0byBhbiBvYmplY3QgdGhhdCBp
cyBub3Qgc2VlbiBieQojIHRoZSB0cmFjaW5nIHBoYXNlIG9mIHRoZSBnYXJi
YWdlIGNvbGxlY3Rvci4gIFRoaXMgYWxsb3dzIHRoZSByZWZlcmVuY2VkCiMg
b2JqZWN0IHRvIGJlIGdhcmJhZ2UgY29sbGVjdGVkIGFzIGlmIG5vdGhpbmcg
aXMgcmVmZXJyaW5nIHRvIGl0LgojCiMgVGhlIGRpZmZlcmVuY2UgYmV0d2Vl
biB0aGlzIGNsYXNzIGFuZCBXZWFrUmVmIGlzIHRoYXQgdGhpcyBjbGFzcyBk
b2VzIG5vdAojIHVzZSB0aGUgZGVsZWdhdG9yIHBhdHRlcm4gYW5kIHNvIGhh
cyBhbiBpbnRlcmZhY2UgbW9yZSBzdWl0ZWQgZm9yIGRldGVjdGluZwojIGlm
IHRoZSByZWZlcmVuY2VkIG9iamVjdCBoYXMgYmVlbiByZWNsYWltZWQuCiMK
IyBVc2FnZToKIwojICAgZm9vID0gT2JqZWN0Lm5ldwojICAgcmVmID0gV2Vh
a1JlZmVyZW5jZS5uZXcoZm9vKQojICAgcmVmLm9iamVjdAkJCSMgc2hvdWxk
IGJlIGZvbwojICAgT2JqZWN0U3BhY2UuZ2FyYmFnZV9jb2xsZWN0CiMgICBy
ZWYub2JqZWN0CQkJIyBzaG91bGQgYmUgbmlsCmNsYXNzIFdlYWtSZWZlcmVu
Y2UKICBhdHRyX3JlYWRlciA6cmVmZXJlbmNlZF9vYmplY3RfaWQKICAKICAj
IE1hcCBvZiByZ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