diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-26 13:17:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-05-26 13:17:07 +0000 |
commit | 771240704854bd767f5873fa4199966f756f5b93 (patch) | |
tree | 229e239ed32446abd89938d6c5591dcade4179c5 | |
parent | c0eb57417cb5f6ebce13c0349f51ed6a9e22e91f (diff) | |
download | bundler-771240704854bd767f5873fa4199966f756f5b93.tar.gz |
* lib/mkmf.rb, lib/optparse.rb, lib/tracer.rb: use Method#to_block
instead of deprecated Method#to_proc. (ruby-bugs-ja:PR#477)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/mkmf.rb | 2 | ||||
-rw-r--r-- | lib/optparse.rb | 6 | ||||
-rw-r--r-- | lib/tracer.rb | 2 |
4 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Mon May 26 21:39:46 2003 MoonWolf <moonwolf@moonwolf.com> + + * lib/mkmf.rb, lib/optparse.rb, lib/tracer.rb: use Method#to_block + instead of deprecated Method#to_proc. (ruby-bugs-ja:PR#477) + Mon May 26 21:21:20 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net> * lib/optparse.rb (OptionParser::Switch::parse, diff --git a/lib/mkmf.rb b/lib/mkmf.rb index eda3389e11..a1fed2278b 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -833,7 +833,7 @@ Config::CONFIG["topdir"] = CONFIG["topdir"] = $configure_args["--topdir"] ||= $curdir $ruby = arg_config("--ruby", CONFIG["ruby_install_name"]) -split = Shellwords.method(:shellwords).to_proc +split = Shellwords.method(:shellwords).to_block EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip} diff --git a/lib/optparse.rb b/lib/optparse.rb index cdc8ce4468..f9d059cd29 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -403,7 +403,7 @@ summary feature. pat = t if t.respond_to?(:match) end unless block - block = pat.method(:convert).to_proc if pat.respond_to?(:convert) + block = pat.method(:convert).to_block if pat.respond_to?(:convert) end @atype[t] = [pat, block] end @@ -938,7 +938,7 @@ Default options, which never appear in option summary. # directly specified pattern(any object possible to match) if !(String === o) and o.respond_to?(:match) pattern = notwice(o, pattern, 'pattern') - conv = (pattern.method(:convert).to_proc if pattern.respond_to?(:convert)) + conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert)) next end @@ -951,7 +951,7 @@ Default options, which never appear in option summary. when CompletingHash when nil pattern = CompletingHash.new - conv = (pattern.method(:convert).to_proc if pattern.respond_to?(:convert)) + conv = (pattern.method(:convert).to_block if pattern.respond_to?(:convert)) else raise ArgumentError, "argument pattern given twice" end diff --git a/lib/tracer.rb b/lib/tracer.rb index 3ccf1b5017..673290c2ab 100644 --- a/lib/tracer.rb +++ b/lib/tracer.rb @@ -62,7 +62,7 @@ class Tracer off end else - set_trace_func method(:trace_func).to_proc + set_trace_func method(:trace_func).to_block stdout.print "Trace on\n" if Tracer.verbose? end end |