mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Use bang variants in couple of places more
This commit is contained in:
parent
5ab4b05add
commit
784e3ac616
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ module Ameba::Rule::Style
|
|||
private def allowed?(_sign, value, fraction, _suffix)
|
||||
return true if fraction && fraction.size > 3
|
||||
|
||||
digits = value.chars.select(&.number?)
|
||||
digits = value.chars.select!(&.number?)
|
||||
digits.size >= int_min_digits
|
||||
end
|
||||
|
||||
|
@ -72,7 +72,7 @@ module Ameba::Rule::Style
|
|||
|
||||
private def slice_digits(value, by = 3)
|
||||
%w[].tap do |slices|
|
||||
value.chars.reject(&.== '_').each_slice(by) do |slice|
|
||||
value.chars.reject!(&.== '_').each_slice(by) do |slice|
|
||||
slices << slice.join
|
||||
end
|
||||
end.join('_')
|
||||
|
|
Loading…
Reference in a new issue