-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Deprecate si prefix #21191
Deprecate si prefix #21191
Conversation
@@ -233,19 +233,6 @@ def test_number_number_to_human_size | |||
end | |||
end | |||
|
|||
def test_number_to_human_size_with_si_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to keep the tests and use assert_deprecated
block just to make sure we don't break the deprecated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of assert_deprecated
. I'll update thanks.
6bb020b
to
e96403b
Compare
The option was deprecated in rails#21191.
Hang on, but isn't it still formatting questionably by default in v5.0.0?
I'd expect either "1000 kB" or "1 MB" and wouldn't mind removal of the option if the default behaviour had been correct in the first place... I can understand not wanting "kiB", "MiB" and the like since not everyone will have seen those before and very few apps would need to use them anyway, but can't we at least have "kB", "MB" and so on computed correctly? If the method is supposed to produce a "human" size, why is it using the base 2 definition of the units? |
As discussed a while ago in #7835 (comment)
cc @rafaelfranca