lib/chunky_png.rb in chunky_png-0.9.2 vs lib/chunky_png.rb in chunky_png-0.10.0
- old
+ new
@@ -25,11 +25,11 @@
# @author Willem van Bergen
module ChunkyPNG
# The current version of ChunkyPNG. This value will be updated automatically
# by them gem:release rake task.
- VERSION = "0.9.2"
+ VERSION = "0.10.0"
###################################################
# PNG international standard defined constants
###################################################
@@ -77,7 +77,17 @@
class ExpectationFailed < ChunkyPNG::Exception
end
# Exception that is raised if an expectation fails.
class OutOfBounds < ChunkyPNG::ExpectationFailed
+ end
+
+ EXTRA_BYTE = (RUBY_VERSION.to_f < 1.9) ? "\0" : "\0".force_encoding('ASCII-8BIT')
+end
+
+if RUBY_VERSION.to_f < 1.9
+ class String
+ alias_method :getbyte, :[]
+ alias_method :setbyte, :[]=
+ alias_method :bytesize, :size
end
end