
[Patch] Enum & Flag types
Reported by Ben Burkert | March 28th, 2008 @ 06:38 PM
Here's a patch for the Enum & Flag types. I followed sam's pastie here: http://pastie.textmate.org/priva...
Enum & Flag are basically the same, only Enum can have only 1 value at a time, while Flag can have multiple values.
I had some trouble with the Class.new(Enum) call from sam's pastie. It was causing errors in the self.inherited method defined in Type.configure, so i changed it to Enum.dup and it seemed to work fine.
One thing I didn't add was a max flag count for the Flag type. Max flags allowed == number of bytes per integer in the database, which i'm not sure about.
Comments and changes to this ticket
-
-
Ben Burkert April 6th, 2008 @ 08:35 PM
- no changes were found...
-
Dan Kubb (dkubb) April 14th, 2008 @ 05:22 PM
- Milestone cleared.
- State changed from new to open
-
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 »