mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-test/mrbgem.rake: fix mrb_state handling bug
You should not pass values from different mrb_state. No one has ever used test_args for gems, the issue has not been realized.
This commit is contained in:
@@ -94,7 +94,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
|
||||
f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern_lit(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));]
|
||||
|
||||
unless g.test_args.empty?
|
||||
f.puts %Q[ test_args_hash = mrb_hash_new_capa(mrb, #{g.test_args.length}); ]
|
||||
f.puts %Q[ test_args_hash = mrb_hash_new_capa(mrb2, #{g.test_args.length}); ]
|
||||
g.test_args.each do |arg_name, arg_value|
|
||||
escaped_arg_name = arg_name.gsub('\\', '\\\\\\\\').gsub('"', '\"')
|
||||
escaped_arg_value = arg_value.gsub('\\', '\\\\\\\\').gsub('"', '\"')
|
||||
|
||||
Reference in New Issue
Block a user