mirror of
https://github.com/moebooru/moebooru
synced 2025-08-22 01:47:48 +00:00
Simpler(?) casting method
This commit is contained in:
parent
17d9d0a96c
commit
4db4fc031b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user