Permalink
Browse files

Misc refactoring for :int_block

  • Loading branch information...
1 parent 1498502 commit 94541a0fbc1aaed45eec89abf5855aed63d41fda @tj committed Jan 19, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/commander/runner.rb
@@ -110,14 +110,14 @@ def version
# :int_message Message to display when interrupted (CTRL + C)
#
- def program key, *args, &blk
+ def program key, *args, &block
if key == :help and !args.empty?
@program[:help] ||= {}
@program[:help][args.first] = args.at(1)
elsif key == :help_formatter && !args.empty?
@program[key] = (@help_formatter_aliases[args.first] || args.first)
- elsif !blk.nil?
- @program[key] = blk
+ elsif block
+ @program[key] = block
else
@program[key] = *args unless args.empty?
@program[key]

0 comments on commit 94541a0

Please sign in to comment.