All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gems.chunky_png-1.3.4.lib.chunky_png.compatibility.rb Maven / Gradle / Ivy

There is a newer version: 3.7.2
Show newest version
# Define the byte-operators on a string if they're not defined (Ruby 1.8)

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

module Enumerable
  unless method_defined?(:minmax)
    def minmax
      [min, max]
    end
  end
end




© 2015 - 2025 Weber Informatics LLC | Privacy Policy