Sha256: 7a4c30229a302385d20bd6aa7a2c40d197a0ad851417facc9e49b2ed36d12e5d

Contents?: true

Size: 270 Bytes

Versions: 268

Compression:

Stored size: 270 Bytes

Contents

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

Version data entries

268 entries across 246 versions & 17 rubygems

Version Path
brakeman-6.1.1 bundle/ruby/3.0.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-6.1.0 bundle/ruby/3.1.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-6.0.1 bundle/ruby/3.1.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-6.0.0 bundle/ruby/3.0.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.4.1 bundle/ruby/3.1.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.4.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.3.1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.3.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.2.3 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.2.2 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.2.1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.2.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.1.2 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.1.1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.1.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.0.4 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.0.2 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.0.1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-5.0.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-4.10.1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb