summaryrefslogtreecommitdiffstats
path: root/lib/getoptlong.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-11 09:32:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-11 09:32:41 +0000
commit4b7c5678893f9cea196510f193ce41c65d79fda5 (patch)
treeaaaef9a55f32047802479707b99a7bf1f8a894da /lib/getoptlong.rb
parentff9a34804183a483114f965ea06037f6e82e5803 (diff)
downloadruby-4b7c5678893f9cea196510f193ce41c65d79fda5.tar.gz
ruby-4b7c5678893f9cea196510f193ce41c65d79fda5.tar.xz
ruby-4b7c5678893f9cea196510f193ce41c65d79fda5.zip
* 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
Diffstat (limited to 'lib/getoptlong.rb')
-rw-r--r--lib/getoptlong.rb9
1 files changed, 5 insertions, 4 deletions
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.