mirror of
https://github.com/moebooru/moebooru
synced 2025-08-22 09:57:31 +00:00
Simpler(?) casting method
This commit is contained in:
parent
17d9d0a96c
commit
4db4fc031b
@ -21,7 +21,7 @@ module Tag::ParseMethods
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
when :rational
|
when :rational
|
||||||
Rational(x.tr(":", "/")).to_f.round(3) rescue 0
|
x.tr(":", "/").to_r.to_f.round(3) rescue 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user