summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-02 09:40:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-02 09:40:44 +0000
commitf6e80a170234c92d155b1a98428cc7c04d51249f (patch)
tree432d6f7a7b12d8d875f710478d40e25af0e43227
parent4d6d2ae1b417133546c56b3150ef51fa7647e2dc (diff)
downloadruby-f6e80a170234c92d155b1a98428cc7c04d51249f.tar.gz
ruby-f6e80a170234c92d155b1a98428cc7c04d51249f.tar.xz
ruby-f6e80a170234c92d155b1a98428cc7c04d51249f.zip
renamed OptionParser#new to #define.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/optparse.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index cbbd572bd..ad47d686e 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -1022,35 +1022,35 @@ Default options, which never appear in option summary.
cf. ((<OptionParser#switch>)).
=end #'#"#`#
- def new(*opts, &block)
+ def define(*opts, &block)
top.append(*(sw = make_switch(*opts, &block)))
sw[0]
end
def on(*opts, &block)
- new(*opts, &block)
+ define(*opts, &block)
self
end
- alias def_option new
+ alias def_option define
- def new_head(*opts, &block)
+ def define_head(*opts, &block)
top.prepend(*(sw = make_switch(*opts, &block)))
sw[0]
end
def on_head(*opts, &block)
- new_head(*opts, &block)
+ define_head(*opts, &block)
self
end
- alias def_head_option new_head
+ alias def_head_option define_head
- def new_tail(*opts, &block)
+ def define_tail(*opts, &block)
base.append(*(sw = make_switch(*opts, &block)))
sw[0]
end
def on_tail(*opts, &block)
- new_tail(*opts, &block)
+ define_tail(*opts, &block)
self
end
- alias def_tail_option new_tail
+ alias def_tail_option define_tail
def separator(string)
top.append(string, nil, nil)