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-5.0.0.pre1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-4.10.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-4.9.1 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-4.9.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
brakeman-4.8.2 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb