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

FloatOption: Add support for scientific notation and + sign #250

Merged
merged 3 commits into from
Jan 17, 2020
Merged

FloatOption: Add support for scientific notation and + sign #250

merged 3 commits into from
Jan 17, 2020

Conversation

flavono123
Copy link
Contributor

@flavono123 flavono123 commented Jan 15, 2020

  • parse the float with a prepended + sign
  • parse scientific notations
  • remove the todo comment

@olleolleolle olleolleolle changed the title supports scientific notations and + sign for float options FloatOption: Add support for scientific notation and + sign Jan 16, 2020
Copy link
Collaborator

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a useful feature for people who use the float option, without being in the way of those who don't.

It clearly removes a TODO item - by fixing it.

Thank you for taking the time to compose this clear and descriptive test as well.

Copy link
Owner

@leejarvis leejarvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks @flavono123! I've added one comment but otherwise it's good to merge

@flavono123 flavono123 requested a review from leejarvis January 17, 2020 06:15
@flavono123
Copy link
Contributor Author

flavono123 commented Jan 17, 2020

Thank you too for reviews on my commits and I admit your comments @leejarvis
Btw, for the style, how about add a lint(rubocop) and run in a travis build?

Copy link
Owner

@leejarvis leejarvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thank you! 💙

Btw, for the style, how about add a lint(rubocop) and run in a travis build?

I do like the idea of adding a linter, through I'm not a fan of the Rubocop defaults so I'd likely need to spend a bit of time playing with it. Let's consider that in a separate PR.

Thanks again! I'll get a new version of Slop cut and release this

@leejarvis leejarvis merged commit c3825b3 into leejarvis:master Jan 17, 2020
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 23, 2020
Update ruby-slop to 4.8.0.


v4.8.0 (2020-01-17)
-------------------

Features:
  * Add support for prefixing integer values with `+` character
  [#243](leejarvis/slop#243) (Juha Ylitalo)
  * Add support for parsing floats with scientific notation
  [#250](leejarvis/slop#250) (Hansuk Hong)

Maintenance:
  * Add 2.7.0 to CI and fix warnings
  [#248](leejarvis/slop#248) (Juha Ylitalo, Andrew Kane)
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.

3 participants