Skip to content

Commit

Permalink
dup arguments and don't use eval when invoking commands
Browse files Browse the repository at this point in the history
Fixes frozen string error when saving the manifest from `vmc push <appname>`.

Change-Id: I1329d75491d817f0903eb4b1329d4c80016b397c
  • Loading branch information
vito committed Dec 16, 2011
1 parent 0d245e9 commit c8db02a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cli/runner.rb
Expand Up @@ -449,7 +449,8 @@ def run
parse_command!

if @namespace && @action
eval("VMC::Cli::Command::#{@namespace.to_s.capitalize}").new(@options).send(@action.to_sym, *@args)
cmd = VMC::Cli::Command.const_get(@namespace.to_s.capitalize)
cmd.new(@options).send(@action, *@args.collect(&:dup))
elsif @help_only || @usage
display_usage
else
Expand Down

0 comments on commit c8db02a

Please sign in to comment.