Files
news.gitea.happylizard.me/bin/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

13 lines
270 B
Ruby

module SafeYAML
class Parse
class Hexadecimal
MATCHER = /\A[-+]?0x[0-9a-fA-F_]+\Z/.freeze
def self.value(value)
# This is safe to do since we already validated the value.
return Integer(value.gsub(/_/, ""))
end
end
end
end