Sha256: b9b488dd7827fe649de42651f432e223711c52ad3cad5a8d2df6fbe8fb68fdf4

Contents?: true

Size: 718 Bytes

Versions: 15

Compression:

Stored size: 718 Bytes

Contents

class String

  # Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/String.html]
  def ascii_only?
    !(self =~ /[^\x00-\x7f]/)
  end unless method_defined? :ascii_only?

  # Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/String.html]
  def clear
    self[0,length] = ""
    self
  end unless method_defined? :clear

  # Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/String.html]
  public :codepoints  # Definition in 1.8.8/string.rb

  # Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/String.html]
  Backports.alias_method self, :each_codepoint, :codepoints

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
backports-1.18.0 lib/backports/1.9.1/string.rb
backports-1.17.1 lib/backports/1.9.1/string.rb
backports-1.17.0 lib/backports/1.9.1/string.rb
backports-1.16.7 lib/backports/1.9.1/string.rb
backports-1.16.6 lib/backports/1.9.1/string.rb
backports-1.16.5 lib/backports/1.9.1/string.rb
backports-1.16.4 lib/backports/1.9.1/string.rb
backports-1.16.3 lib/backports/1.9.1/string.rb
backports-1.16.2 lib/backports/1.9.1/string.rb
backports-1.16.1 lib/backports/1.9.1/string.rb
backports-1.15.0 lib/backports/1.9.1/string.rb
backports-1.14.1 lib/backports/1.9.1/string.rb
backports-1.14.0 lib/backports/1.9.1/string.rb
backports-1.13.3 lib/backports/1.9.1/string.rb
backports-1.13.2 lib/backports/1.9.1/string.rb