diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-02-28 05:34:01 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-02-28 05:34:01 -0800 |
| commit | c86747a2774660e3934784adc36bd1ccf47c164f (patch) | |
| tree | fe1373a174a458d997f109da5d1a3b124c189c08 | |
| parent | f586dff5afa35ddbdce30c028afaeb27ad4de697 (diff) | |
| parent | 1f692ab0ba1def0291bf63cd8c295180d8fcc0e3 (diff) | |
| download | mruby-c86747a2774660e3934784adc36bd1ccf47c164f.tar.gz mruby-c86747a2774660e3934784adc36bd1ccf47c164f.zip | |
Merge pull request #906 from xxuejie/remove_unused_var
Do not generate test_args_hash variable if it is not used
| -rw-r--r-- | tasks/mrbgems_test.rake | 6 |
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);] |
