Sha256: 73694e869ebb63f92268d32c33bc67c968f947919aa58116ddeeba1d93a1c7d6

Contents?: true

Size: 198 Bytes

Versions: 25

Compression:

Stored size: 198 Bytes

Contents

unless String.method_defined? :codepoints
  class String
    def codepoints
      return to_enum(:codepoints) unless block_given?
      unpack("U*").each{|cp| yield cp}
      self
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
backports-3.25.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.24.1 lib/backports/1.9.1/string/codepoints.rb
backports-3.24.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.23.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.22.1 lib/backports/1.9.1/string/codepoints.rb
backports-3.22.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.21.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.20.2 lib/backports/1.9.1/string/codepoints.rb
backports-3.20.1 lib/backports/1.9.1/string/codepoints.rb
backports-3.20.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.19.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.18.2 lib/backports/1.9.1/string/codepoints.rb
backports-3.18.1 lib/backports/1.9.1/string/codepoints.rb
backports-3.18.0 lib/backports/1.9.1/string/codepoints.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/backports-3.12.0/lib/backports/1.9.1/string/codepoints.rb
backports-3.17.2 lib/backports/1.9.1/string/codepoints.rb
backports-3.17.1 lib/backports/1.9.1/string/codepoints.rb
backports-3.17.0 lib/backports/1.9.1/string/codepoints.rb
backports-3.16.1 lib/backports/1.9.1/string/codepoints.rb
backports-3.16.0 lib/backports/1.9.1/string/codepoints.rb