summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCarson McDonald <[email protected]>2013-01-30 05:36:03 -0500
committerCarson McDonald <[email protected]>2013-01-30 05:36:03 -0500
commitc1ca6621700fcc486daed1209d0a9b0440a985bf (patch)
tree4531a86aeed6ecb31fa261cabf61a5b1ee7d4f3e
parent33081f52ab7f3363f5811ae4101ee81fbf0e86fd (diff)
downloadmruby-c1ca6621700fcc486daed1209d0a9b0440a985bf.tar.gz
mruby-c1ca6621700fcc486daed1209d0a9b0440a985bf.zip
Changed variable $test_args to constant TEST_ARGS
-rw-r--r--examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake2
-rw-r--r--examples/mrbgems/c_extension_example/mrbgem.rake2
-rw-r--r--examples/mrbgems/ruby_extension_example/mrbgem.rake2
-rw-r--r--tasks/mrbgems_test.rake2
4 files changed, 4 insertions, 4 deletions
diff --git a/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake b/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake
index 067aa2cba..35dbe5e18 100644
--- a/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake
+++ b/examples/mrbgems/c_and_ruby_extension_example/mrbgem.rake
@@ -18,6 +18,6 @@ MRuby::Gem::Specification.new('c_and_ruby_extension_example') do |spec|
# spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) }
# spec.test_preload = 'test/assert.rb'
- # Values accessible as $test_args inside test scripts
+ # Values accessible as TEST_ARGS inside test scripts
# spec.test_args = {'tmp_dir' => Dir::tmpdir}
end
diff --git a/examples/mrbgems/c_extension_example/mrbgem.rake b/examples/mrbgems/c_extension_example/mrbgem.rake
index f56564222..8c132b233 100644
--- a/examples/mrbgems/c_extension_example/mrbgem.rake
+++ b/examples/mrbgems/c_extension_example/mrbgem.rake
@@ -18,6 +18,6 @@ MRuby::Gem::Specification.new('c_extension_example') do |spec|
# spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) }
# spec.test_preload = 'test/assert.rb'
- # Values accessible as $test_args inside test scripts
+ # Values accessible as TEST_ARGS inside test scripts
# spec.test_args = {'tmp_dir' => Dir::tmpdir}
end
diff --git a/examples/mrbgems/ruby_extension_example/mrbgem.rake b/examples/mrbgems/ruby_extension_example/mrbgem.rake
index 4429460e9..3a80b5cd7 100644
--- a/examples/mrbgems/ruby_extension_example/mrbgem.rake
+++ b/examples/mrbgems/ruby_extension_example/mrbgem.rake
@@ -18,6 +18,6 @@ MRuby::Gem::Specification.new('ruby_extension_example') do |spec|
# spec.test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map { |f| objfile(f.relative_path_from(dir).pathmap("#{build_dir}/%X")) }
# spec.test_preload = 'test/assert.rb'
- # Values accessible as $test_args inside test scripts
+ # Values accessible as TEST_ARGS inside test scripts
# spec.test_args = {'tmp_dir' => Dir::tmpdir}
end
diff --git a/tasks/mrbgems_test.rake b/tasks/mrbgems_test.rake
index b1c318556..80c309c44 100644
--- a/tasks/mrbgems_test.rake
+++ b/tasks/mrbgems_test.rake
@@ -40,7 +40,7 @@ MRuby.each_target do
escaped_arg_value = arg_value.gsub('\\', '\\\\\\\\').gsub('"', '\"')
f.puts %Q[ mrb_hash_set(mrb2, test_args_hash, mrb_str_new(mrb2, "#{escaped_arg_name.to_s}", #{escaped_arg_name.to_s.length}), mrb_str_new(mrb2, "#{escaped_arg_value.to_s}", #{escaped_arg_value.to_s.length})); ]
end
- f.puts %Q[ mrb_gv_set(mrb2, mrb_intern(mrb2, "$test_args"), test_args_hash); ]
+ f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern(mrb2, "TEST_ARGS"), test_args_hash); ]
end
f.puts %Q[ mrb_#{g.funcname}_gem_test(mrb2);] unless g.test_objs.empty?