Skip to content

Commit

Permalink
fixup! Add Int#humanize_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jul 3, 2018
1 parent afce539 commit 3a21391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/int.cr
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ struct Int
#
# See `Number#humanize` for more details on the behaviour and arguments.
def humanize_bytes(io : IO, precision : Int = 3, separator = '.', *, significant : Bool = true, standard : Symbol = :JEDEC) : Nil
humanize(io, precision, separator, nil, base: 2 ** 10, significant: significant) do |magnitude|
humanize(io, precision, separator, nil, base: 1024, significant: significant) do |magnitude|
magnitude = Number.prefix_index(magnitude)

prefix = Number.si_prefix(magnitude)
Expand Down

0 comments on commit 3a21391

Please sign in to comment.