Sha256: 81f8a23982428ab2ddeab5b68a5c63629443783901d0ed9e85a55d0de5ffbaee

Contents?: true

Size: 349 Bytes

Versions: 5

Compression:

Stored size: 349 Bytes

Contents

class String
  alias_method :getbyte, :[]    unless method_defined?(:getbyte)
  alias_method :setbyte, :[]=   unless method_defined?(:setbyte)
  alias_method :bytesize, :size unless method_defined?(:bytesize)
end

class Object
  unless method_defined?(:tap)
    def tap(&block)
      yield(self) if block_given?
      return self
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chunky_png-1.0.0.beta2 lib/chunky_png/compatibility.rb
chunky_png-1.0.0.beta1 lib/chunky_png/compatibility.rb
chunky_png-0.12.0 lib/chunky_png/compatibility.rb
chunky_png-0.11.1 lib/chunky_png/compatibility.rb
chunky_png-0.11.0 lib/chunky_png/compatibility.rb