• S
    Refactor enum to be defined in terms of the attributes API · c51f9b61
    Sean Griffin 提交于
    In addition to cleaning up the implementation, this allows type casting
    behavior to be applied consistently everywhere. (#where for example). A
    good example of this was the previous need for handling value to key
    conversion in the setter, because the number had to be passed to `where`
    directly. This is no longer required, since we can just pass the string
    along to where. (It's left around for backwards compat)
    
    Fixes #18387
    c51f9b61
enum_test.rb 8.0 KB