From: "matz (Yukihiro Matsumoto)" <matz@...> Date: 2012-04-09T08:14:22+09:00 Subject: [ruby-core:44203] [ruby-trunk - Feature #4234] Hash#default_proc= Doesn't Accept nil Argument Issue #4234 has been updated by matz (Yukihiro Matsumoto). Assignee changed from matz (Yukihiro Matsumoto) to marcandre (Marc-Andre Lafortune) Agreed. Marc, could you check this patch in (with document update)? Matz. ---------------------------------------- Feature #4234: Hash#default_proc= Doesn't Accept nil Argument https://bugs.ruby-lang.org/issues/4234#change-25730 Author: runpaint (Run Paint Run Run) Status: Assigned Priority: Normal Assignee: marcandre (Marc-Andre Lafortune) Category: core Target version: =begin The initial value of a Hash's default Proc is the block passed to Hash.new or nil. Hash#default_proc= can set the default Proc to a given Proc, but can't reset it to nil. This is unsymmetrical. The attached patch lets #default_proc= take a nil argument, and provides tests. This causes a RubySpec failure ("Hash#default_proc= raises an error if passed stuff not convertible to procs"), which I will fix if this patch is applied. =end -- http://bugs.ruby-lang.org/