Repository navigation
Remove const_missing method in favor of const_set - #16
Merged
Merged
Conversation
laertispappas
force-pushed
the
lp/11/const_set
branch
from
February 22, 2017 20:19
b35623f to
e76918e
Compare
dblock
reviewed
Feb 22, 2017
| end | ||
| end | ||
|
|
||
| # https://github.com/dblock/ruby-enum/pull/11 |
Owner
There was a problem hiding this comment.
I don't think this comment is useful, it's pretty clear what's going on. CHANGELOG and git blame can always help you find the source.
Owner
|
Looks great. Just missing CHANGELOG entry please. |
laertispappas
force-pushed
the
lp/11/const_set
branch
from
February 22, 2017 21:41
e76918e to
7e6fe91
Compare
Define constant with const_set instead of "fetching" them with const_missing. These changes were proposed by @dmoss18 in his initial PR (dblock#11). I also add a spec to support the new feature. I kept const_missing method in order to raise the custom Ruby::Enum::Errors::DuplicateKeyError since it provides a handy way to inform the end user for the exception raised.
laertispappas
force-pushed
the
lp/11/const_set
branch
from
February 22, 2017 21:45
7e6fe91 to
f0e09fa
Compare
Owner
|
Feel free to make a release with this @laertispappas. |
Collaborator
Author
|
Sure. I will. Thanks. |
kivikakk
pushed a commit
to gjtorikian/commonmarker
that referenced
this pull request
Feb 23, 2017
This is all we need right now, and dblock/ruby-enum#16 is causing issues for new installs.
|
This change has caused some issues in my projects that rely on ruby-enum: The definition of my enum is here. Am I doing something wrong? I'm not sure why this redefinition error change would now start raising |
Owner
|
@gjtorikian Can you reopen a new issue? Maybe with a failing test, please? |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Define constant with const_set instead of "fetching"
them with const_missing. These changes were proposed
by @dmoss18 in his initial PR (#11).
I kept const_missing method in order to raise the custom
Ruby::Enum::Errors::DuplicateKeyError since
it provides a handy way to inform the end user
for the exception raised.