<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-# encoding: utf-8
+# encoding: ASCII-8BIT
 
 # png.rb : Extracts the data from a PNG that is needed for embedding
 #
@@ -125,20 +125,20 @@ module Prawn
           row_data = data.slice! 0, scanline_length
           filter = row_data.shift
           case filter
-          when 0 then # None
-          when 1 then # Sub
+          when 0 # None
+          when 1 # Sub
             row_data.each_with_index do |byte, index|
               left = index &lt; pixel_length ? 0 : row_data[index - pixel_length]
               row_data[index] = (byte + left) % 256
               #p [byte, left, row_data[index]]
             end
-          when 2 then # Up
+          when 2 # Up
             row_data.each_with_index do |byte, index|
               col = index / pixel_length
               upper = row == 0 ? 0 : pixels[row-1][col][index % pixel_length]
               row_data[index] = (upper + byte) % 256
             end
-          when 3 then # Average
+          when 3  # Average
             row_data.each_with_index do |byte, index|
               col = index / pixel_length
               upper = row == 0 ? 0 : pixels[row-1][col][index % pixel_length]
@@ -146,7 +146,7 @@ module Prawn
 
               row_data[index] = (byte + ((left + upper)/2).floor) % 256
             end
-          when 4 then # Paeth
+          when 4 # Paeth
             left = upper = upper_left = nil
             row_data.each_with_index do |byte, index|
               col = index / pixel_length</diff>
      <filename>lib/prawn/images/png.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-# encoding: utf-8
+# encoding: ASCII-8BIT
 
 # Spec'ing the PNG class. Not complete yet - still needs to check the
 # contents of palette and transparency to ensure they're correct.
@@ -115,13 +115,13 @@ describe &quot;When reading a greyscale+alpha PNG file (color type 4)&quot; do
 
   it &quot;should correctly return the raw image data (with no alpha channel) from the image data chunk&quot; do
     png = Prawn::Images::PNG.new(@img_data)
-    data = File.open(@data_filename, &quot;rb&quot;) { |f| f.read }
+    data = File.open(@data_filename, rb_flag) { |f| f.read }
     png.img_data.should == data
   end
 
   it &quot;should correctly extract the alpha channel data from the image data chunk&quot; do
     png = Prawn::Images::PNG.new(@img_data)
-    data = File.open(@alpha_data_filename, &quot;rb&quot;) { |f| f.read }
+    data = File.open(@alpha_data_filename, rb_flag) { |f| f.read }
     png.alpha_channel.should == data
   end
 end
@@ -132,7 +132,7 @@ describe &quot;When reading an RGB+alpha PNG file (color type 6)&quot; do
     @filename = &quot;#{Prawn::BASEDIR}/data/images/dice.png&quot;
     @data_filename = &quot;#{Prawn::BASEDIR}/data/images/dice.dat&quot;
     @alpha_data_filename = &quot;#{Prawn::BASEDIR}/data/images/dice.alpha&quot;
-    @img_data = File.open(@filename, &quot;rb&quot;) { |f| f.read }
+    @img_data = File.open(@filename, &quot;rb&quot;) { |f| f.read }       
   end
 
   it &quot;should read the attributes from the header chunk correctly&quot; do
@@ -149,13 +149,13 @@ describe &quot;When reading an RGB+alpha PNG file (color type 6)&quot; do
 
   it &quot;should correctly return the raw image data (with no alpha channel) from the image data chunk&quot; do
     png = Prawn::Images::PNG.new(@img_data)
-    data = File.open(@data_filename, &quot;rb&quot;) { |f| f.read }
+    data = File.open(@data_filename, rb_flag) { |f| f.read }     
     png.img_data.should == data
   end
 
   it &quot;should correctly extract the alpha channel data from the image data chunk&quot; do
     png = Prawn::Images::PNG.new(@img_data)
-    data = File.open(@alpha_data_filename, &quot;rb&quot;) { |f| f.read }
+    data = File.open(@alpha_data_filename, rb_flag) { |f| f.read }
     png.alpha_channel.should == data
   end
 end</diff>
      <filename>spec/png_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -33,4 +33,8 @@ end
 def parse_pdf_object(obj)
   PDF::Reader::Parser.new(
      PDF::Reader::Buffer.new(sio = StringIO.new(obj)), nil).parse_token   
+end    
+
+def rb_flag
+  ruby_18 { &quot;rb&quot; } || ruby_19 { &quot;rb:ASCII-8BIT&quot; }
 end</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c9018a0bae2c7bcb76a3b81309b346a8f21a0946</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/2478ff8c26fa91a83ac35878514b65832ba80b0d</url>
  <id>2478ff8c26fa91a83ac35878514b65832ba80b0d</id>
  <committed-date>2008-08-11T11:01:51-07:00</committed-date>
  <authored-date>2008-08-11T11:01:51-07:00</authored-date>
  <message>m17n cargo cult. yob, plz investigate</message>
  <tree>ddec4183f5c1a1c16d7b0cbf0563e4aa99de8a54</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
