Index: src/lib/ruby/1.8/zlib.rb
===================================================================
RCS file: /cvsroot/jruby/jruby/src/lib/ruby/1.8/zlib.rb,v
retrieving revision 1.7
diff -u -r1.7 zlib.rb
--- src/lib/ruby/1.8/zlib.rb	23 Mar 2006 13:43:59 -0000	1.7
+++ src/lib/ruby/1.8/zlib.rb	24 Mar 2006 15:36:59 -0000
@@ -575,7 +575,7 @@
     #
     def readchar
       val = getc
-      raise EOFError.new("end of file reached") if val.nil?1
+      raise EOFError.new("end of file reached") if val.nil?
       val
     end
 
@@ -604,11 +604,8 @@
       c == -1 ? nil : c
     end
 
-    #
-    # Not supported.
-    #
     def eof
-      false
+      eof?
     end
 
     #
@@ -629,11 +626,8 @@
     def unused
     end
 
-    #
-    # Not supported.
-    #
     def eof?
-      eof
+      @io.available == 0
     end
 
     #
@@ -644,7 +638,9 @@
       # unit tests so I added this as a quick hack (plus newline is the common case so it will
       # have some use until it is fixed).
       b = BufferedReader.new(InputStreamReader.new(@io))
-	  b.readLine + "\n"
+      line = b.readLine
+      line += "\n" if line
+      line
     end
     
     #
Index: src/builtin/yaml.rb
===================================================================
RCS file: /cvsroot/jruby/jruby/src/builtin/yaml.rb,v
retrieving revision 1.2
diff -u -r1.2 yaml.rb
--- src/builtin/yaml.rb	10 Feb 2006 21:53:26 -0000	1.2
+++ src/builtin/yaml.rb	24 Mar 2006 15:36:24 -0000
@@ -933,12 +933,12 @@
 	# Class method for creating streams
 	#
 	def YAML.make_stream( io )
-        if String === io
+          if String === io
             io = StringIO.new( io )
-        elsif not IO === io
+          elsif not (io.respond_to?(:readline) and io.respond_to?(:read))
             raise YAML::Error, "YAML stream must be an IO or String object."
-        end
-        if YAML::unicode
+          end
+          if YAML::unicode
             def io.readline
                 YAML.utf_to_internal( readline( @ln_sep ), @utf_encoding )
             end
