Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle number->number, any->string, and symbol->keyword #26

Merged
merged 5 commits into from
Sep 24, 2019

Conversation

WhittlesJr
Copy link
Contributor

@WhittlesJr WhittlesJr commented Sep 19, 2019

I'm attempting to use spec-coerce as the backend for cyrus-config: dryewo/cyrus-config#2

During the process, I found a few conversions that I expected to work but didn't, namely:

int? -> double? (remains an int, and thus fails coerce!)
any? -> string? (no string? handler existed yet)
symbol? -> keyword? (can be done by simply calling keyword on it.)

Resolves #25 and then some

@wilkerlucio
Copy link
Owner

Thanks, looks nice, can you please add tests covering the new behavior?

@WhittlesJr
Copy link
Contributor Author

Sure! Is this sufficient?

@wilkerlucio
Copy link
Owner

Sure

@wilkerlucio wilkerlucio merged commit 1546a78 into wilkerlucio:master Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parse-long and parse-double should cast numeric types
2 participants