Sha256: d278f1cb8096e7dbb45bcfa0180206947b04f1f3297f7afe779cd2150a50ee61
Contents?: true
Size: 358 Bytes
Versions: 50
Compression:
Stored size: 358 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true class String #:nodoc: unless method_defined?(:ascii_only?) # Backport from Ruby 1.9 checks for non-us-ascii characters. def ascii_only? self !~ MATCH_NON_US_ASCII end MATCH_NON_US_ASCII = /[^\x00-\x7f]/ end unless method_defined?(:bytesize) alias :bytesize :length end end
Version data entries
50 entries across 36 versions & 9 rubygems