summaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorXuejie "Rafael" Xiao <[email protected]>2013-02-27 21:29:49 -0500
committerXuejie "Rafael" Xiao <[email protected]>2013-02-27 21:29:49 -0500
commit1f692ab0ba1def0291bf63cd8c295180d8fcc0e3 (patch)
treed3e4e3da6b78df6b43f7dd381e5dcb3d559efb1e /tasks
parentfbe041768bf133268b63344957acb05962df41c7 (diff)
downloadmruby-1f692ab0ba1def0291bf63cd8c295180d8fcc0e3.tar.gz
mruby-1f692ab0ba1def0291bf63cd8c295180d8fcc0e3.zip
Do not generate test_args_hash variable if it is not used
Diffstat (limited to 'tasks')
-rw-r--r--tasks/mrbgems_test.rake6
1 files changed, 5 insertions, 1 deletions
diff --git a/tasks/mrbgems_test.rake b/tasks/mrbgems_test.rake
index 6d40d092a..6ca5eaef2 100644
--- a/tasks/mrbgems_test.rake
+++ b/tasks/mrbgems_test.rake
@@ -18,7 +18,11 @@ MRuby.each_target do
f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb) {]
unless g.test_rbfiles.empty?
f.puts %Q[ mrb_state *mrb2;]
- f.puts %Q[ mrb_value val1, val2, ary1, ary2, test_args_hash;]
+ if g.test_args.empty?
+ f.puts %Q[ mrb_value val1, val2, ary1, ary2;]
+ else
+ f.puts %Q[ mrb_value val1, val2, ary1, ary2, test_args_hash;]
+ end
f.puts %Q[ int ai;]
g.test_rbfiles.count.times do |i|
f.puts %Q[ ai = mrb_gc_arena_save(mrb);]