Sha256: ede5e4e3f905ffcd0acb7f66986686d946955f8776a80e4b8c4e979fc037aa1a

Contents?: true

Size: 323 Bytes

Versions: 26

Compression:

Stored size: 323 Bytes

Contents

class String
  if self.method_defined?(:ord)
    def getord(offset); self[offset].ord; end
  else
    alias :getord :[]
  end

  unless self.method_defined?(:b)
    if self.method_defined?(:force_encoding)
      def b; self.dup.force_encoding(Encoding::ASCII_8BIT); end
    else
      def b; self.dup; end
    end
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
gitlab-grit-2.8.3 lib/grit/ruby1.9.rb
gitlab-grit-2.8.2 lib/grit/ruby1.9.rb
gitlab-grit-2.8.1 lib/grit/ruby1.9.rb
gitlab-grit-2.8.0 lib/grit/ruby1.9.rb
gitlab-grit-2.7.3 lib/grit/ruby1.9.rb
gitlab-grit-2.6.12 lib/grit/ruby1.9.rb
gitlab-grit-2.7.2 lib/grit/ruby1.9.rb
gitlab-grit-2.6.11 lib/grit/ruby1.9.rb
gitlab-grit-2.7.1 lib/grit/ruby1.9.rb
gitlab-grit-2.6.10 lib/grit/ruby1.9.rb
gitlab-grit-2.7.0 lib/grit/ruby1.9.rb
gitlab-grit-2.6.9 lib/grit/ruby1.9.rb
gitlab-grit-2.6.8 lib/grit/ruby1.9.rb
gitlab-grit-2.6.7 lib/grit/ruby1.9.rb
gitlab-grit-2.6.6 lib/grit/ruby1.9.rb
gitlab-grit-2.6.5 lib/grit/ruby1.9.rb
gitlab-grit-2.6.4 lib/grit/ruby1.9.rb
gitlab-grit-2.6.3 lib/grit/ruby1.9.rb
gitlab-grit-2.6.2 lib/grit/ruby1.9.rb
gitlab-grit-2.5.2 lib/grit/ruby1.9.rb