ice_nine icon indicating copy to clipboard operation
ice_nine copied to clipboard

IceNine.deep_freeze(SimpleDelegator.new(nil)) freezes nil

Open mbj opened this issue 11 years ago • 0 comments

I personally do not have problems with freezing nil. As I do not want anything in my apps to metaprogram around in nil's public interface.

But as there are special precautions NOT to freeze nil via the IceNine::Freezer::NilClass I wounder if we should guard against this case or drop the nil specific freezer for symmetry.

Background:

I noticed that the SimpleDelegator freezes nil when updating dependencies to rspec3 where some unrelated edge case made me print nil.frozen?.

A commit in that PR fixes the specs not to call IceNine.deep_freeze(SimpleDelegator.new(nil)) already.

I'm curios what you think about freezing nil @dkubb.

mbj avatar Dec 02 '14 01:12 mbj