Index: src/builtin/zlib.rb
===================================================================
RCS file: /cvsroot/jruby/jruby/src/builtin/zlib.rb,v
retrieving revision 1.1
diff -u -r1.1 zlib.rb
--- src/builtin/zlib.rb	17 Jun 2006 22:27:23 -0000	1.1
+++ src/builtin/zlib.rb	18 Jun 2006 13:33:42 -0000
@@ -171,30 +171,6 @@
     end
 end
 
-class Zlib::Error < StandardError
-end
-
-class Zlib::StreamEnd < Zlib::Error
-end
-
-class Zlib::StreamError < Zlib::Error
-end
-
-class Zlib::BufError < Zlib::Error
-end
-
-class Zlib::NeedDict < Zlib::Error
-end
-
-class Zlib::MemError < Zlib::Error
-end
-
-class Zlib::VersionError < Zlib::Error
-end
-
-class Zlib::DataError < Zlib::Error
-end
-
 #
 # The abstract base class for Deflater and Inflater. 
 # This implementation don't really do so much, except for provide som common
@@ -357,18 +333,6 @@
     end
 end
 
-class Zlib::GzipFile::Error < Zlib::Error
-end
-
-class Zlib::GzipFile::CRCError < Zlib::GzipFile::Error
-end
-
-class Zlib::GzipFile::NoFooter < Zlib::GzipFile::Error
-end
-
-class Zlib::GzipFile::LengthError < Zlib::GzipFile::Error
-end
-
 #
 # Zlib::Deflate is the class for compressing data.
 # The implementation is patchy, due to bad underlying support
@@ -446,15 +410,3 @@
       @defl.deflate(string,flush)
     end
 end
-
-class Zlib::GzipFile::CRCError < Zlib::GzipFile::Error
-end
-
-class Zlib::GzipFile::Error < Zlib::Error
-end
-
-class Zlib::GzipFile::NoFooter < Zlib::GzipFile::Error
-end
-
-class Zlib::GzipFile::LengthError < Zlib::GzipFile::Error
-end
Index: src/org/jruby/RubyZlib.java
===================================================================
RCS file: /cvsroot/jruby/jruby/src/org/jruby/RubyZlib.java,v
retrieving revision 1.1
diff -u -r1.1 RubyZlib.java
--- src/org/jruby/RubyZlib.java	17 Jun 2006 22:27:22 -0000	1.1
+++ src/org/jruby/RubyZlib.java	18 Jun 2006 13:33:33 -0000
@@ -49,6 +49,15 @@
     public static RubyModule createZlibModule(IRuby runtime) {
         RubyModule result = runtime.defineModule("Zlib");
 
+        final RubyClass zlErr = result.defineClassUnder("ZlibError",runtime.getClass("StandardError"));
+        result.defineClassUnder("StreamEnd",zlErr);
+        result.defineClassUnder("StreamError",zlErr);
+        result.defineClassUnder("BufError",zlErr);
+        result.defineClassUnder("NeedDict",zlErr);
+        result.defineClassUnder("MemError",zlErr);
+        result.defineClassUnder("VersionError",zlErr);
+        result.defineClassUnder("DataError",zlErr);
+        
         RubyClass gzfile = result.defineClassUnder("GzipFile", runtime.getObject());
         CallbackFactory callbackFactory = runtime.callbackFactory(RubyGzipFile.class);
         gzfile.defineSingletonMethod("wrap", callbackFactory.getSingletonMethod("wrap", RubyGzipFile.class, IRubyObject.class));
@@ -66,6 +75,11 @@
         gzfile.defineMethod("level", callbackFactory.getMethod("level"));
         gzfile.defineMethod("sync=", callbackFactory.getMethod("set_sync", IRubyObject.class));
 
+        final RubyClass gzErr = gzfile.defineClassUnder("Error",zlErr);
+        gzfile.defineClassUnder("CRCError",gzErr);
+        gzfile.defineClassUnder("NoFooter",gzErr);
+        gzfile.defineClassUnder("LengthError",gzErr);
+        
         RubyClass gzreader = result.defineClassUnder("GzipReader", gzfile);
         gzreader.includeModule(runtime.getModule("Enumerable"));
         CallbackFactory callbackFactory2 = runtime.callbackFactory(RubyGzipReader.class);
@@ -107,6 +121,8 @@
         gzwriter.defineMethod("tell", callbackFactory3.getMethod("tell"));
         gzwriter.defineMethod("write", callbackFactory3.getMethod("write", IRubyObject.class));
 
+        
+        
         return result;
     }
 
