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

Better handling of Rational values in #to_s #26

Merged
merged 2 commits into from Jan 8, 2015

Commits on Jan 4, 2015

  1. Better handling of Rational values in #to_s

    Added #value_string to parallel #unit_string, which does two things when
    the value is Rational:
    
    - If the denominator is 1, don't show it.
    - Otherwise, wrap the value in parentheses so that it can be parsed
      properly.
    
    Also added specs for two cases that would fail previously.
    
    Should fix minad#22.
    fordhurley committed Jan 4, 2015
    Copy the full SHA
    66c73cc View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2015

  1. Copy the full SHA
    e269b6e View commit details
    Browse the repository at this point in the history