wycats/thor — Issue #200: method_option :type => :array doesn't seem to pass the captured arguments
Author: Tass
Created: 2011-11-25 14:35:00+00:00
State: open

Code:

class Foo < Thor
method_option :values, :type => :array
desc "testing", "something to thest with"
def bar(ary)
puts ary
end
end

Call:

thor foo:bar --values=foo bar

Message:

ArgumentError: wrong number of arguments (0 for 1)
__send__ at org/jruby/RubyBasicObject.java:1688
send at org/jruby/RubyKernel.java:2114
run at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/task.rb:21
invoke_task at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/invocation.rb:118
dispatch at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor.rb:263
start at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/base.rb:389
method_missing at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/runner.rb:34
__send__ at org/jruby/RubyBasicObject.java:1700
send at org/jruby/RubyKernel.java:2122
run at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/task.rb:21
run at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/task.rb:108
invoke_task at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/invocation.rb:118
dispatch at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor.rb:263
start at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/lib/thor/base.rb:389
(root) at /home/tass/.rvm/gems/jruby-1.6.5/gems/thor-0.14.6/bin/thor:6
load at org/jruby/RubyKernel.java:1073
(root) at /home/tass/.rvm/gems/jruby-1.6.5/bin/thor:19