2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-22 01:47:48 +00:00

Simpler(?) casting method

This commit is contained in:
nanaya 2025-03-30 03:33:18 +09:00
parent 17d9d0a96c
commit 4db4fc031b

View File

@ -21,7 +21,7 @@ module Tag::ParseMethods
nil
end
when :rational
Rational(x.tr(":", "/")).to_f.round(3) rescue 0
x.tr(":", "/").to_r.to_f.round(3) rescue 0
end
end