
`:default => false` has no effect for TrueClass properties
Reported by Sergei Yakovlev | May 3rd, 2008 @ 03:09 PM
Adding
:default => falseoption to a
TrueClass
property has no effect. See attached example. A workaround is to use :default => lambda { false }.
Comments and changes to this ticket
-
Sam Smoot May 8th, 2008 @ 03:51 PM
- Assigned user set to Adam French
Odd... I see explicit @default.nil? checks so I don't see why this should be happening.
I do see that #attribute_get isn't actually setting the value tho'. Just returning it. So that may be what you're seeing. I think it should set it as well.
We'll spec it out.
Adam: PDI.
-
Adam French May 8th, 2008 @ 04:31 PM
- State changed from new to invalid
@sergi, I'm having a hard time reproducing this error in a spec. Could you have a look at
http://github.com/sam/dm-core/commit/aa713adb253799557f43d0abbc65e9ef72b17bdd
And let me know what I missed?
...marking invalid for now.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »