From 4b7c5678893f9cea196510f193ce41c65d79fda5 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 11 Dec 2002 09:32:41 +0000 Subject: * io.c (io_read): takes optional second argument to specify a string to be written. the string should not be frozen. * io.c (rb_io_sysread): ditto. * lib/getoptlong.rb (GetoptLong::Error): provide a common ancestor for GetoptLong error classes (RCR#129). * re.c (rb_reg_copy_object): fixed memory leak. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/getoptlong.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/getoptlong.rb') diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb index e90a9d45b..9c8ed09db 100644 --- a/lib/getoptlong.rb +++ b/lib/getoptlong.rb @@ -33,10 +33,11 @@ class GetoptLong # # Error types. # - class AmbigousOption < StandardError; end - class NeedlessArgument < StandardError; end - class MissingArgument < StandardError; end - class InvalidOption < StandardError; end + class Error < StandardError; end + class AmbigousOption < Error; end + class NeedlessArgument < Error; end + class MissingArgument < Error; end + class InvalidOption < Error; end # # Initializer. -- cgit