Sha256: e847634ba08f735183b768f2951f6c9b07e4178c196bb53a77d952ec37939a52

Contents?: true

Size: 391 Bytes

Versions: 36

Compression:

Stored size: 391 Bytes

Contents

# 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

Version data entries

36 entries across 34 versions & 6 rubygems

Version Path
chunky_png-1.3.11 lib/chunky_png/compatibility.rb
chunky_png-1.3.10 lib/chunky_png/compatibility.rb
chunky_png-1.3.9 lib/chunky_png/compatibility.rb
arcabouco-0.2.13 vendor/bundle/gems/chunky_png-1.3.8/lib/chunky_png/compatibility.rb
arcabouco-0.2.13 vendor/bundle/gems/chunky_png-1.3.6/lib/chunky_png/compatibility.rb
chunky_png-1.3.8 lib/chunky_png/compatibility.rb
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/chunky_png-1.3.7/lib/chunky_png/compatibility.rb
chunky_png-1.3.7 lib/chunky_png/compatibility.rb
chunky_png-1.3.6 lib/chunky_png/compatibility.rb
bench9000-0.1 vendor/chunky_png/lib/chunky_png/compatibility.rb
chunky_png-1.3.5 lib/chunky_png/compatibility.rb
chunky_png-1.3.4 lib/chunky_png/compatibility.rb
chunky_png-1.3.3 lib/chunky_png/compatibility.rb
chunky_png-1.3.2 lib/chunky_png/compatibility.rb
chunky_png-1.3.1 lib/chunky_png/compatibility.rb
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/chunky_png-1.3.0/lib/chunky_png/compatibility.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/chunky_png-1.3.0/lib/chunky_png/compatibility.rb
chunky_png-1.3.0 lib/chunky_png/compatibility.rb
chunky_png-1.2.9 lib/chunky_png/compatibility.rb
chunky_png-1.2.8 lib/chunky_png/compatibility.rb