Skip to content

Commit 3310e10

Browse files
committed
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.
1 parent 4769a47 commit 3310e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mrbgems/mruby-test/mrbgem.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
9494
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}));]
9595

9696
unless g.test_args.empty?
97-
f.puts %Q[ test_args_hash = mrb_hash_new_capa(mrb, #{g.test_args.length}); ]
97+
f.puts %Q[ test_args_hash = mrb_hash_new_capa(mrb2, #{g.test_args.length}); ]
9898
g.test_args.each do |arg_name, arg_value|
9999
escaped_arg_name = arg_name.gsub('\\', '\\\\\\\\').gsub('"', '\"')
100100
escaped_arg_value = arg_value.gsub('\\', '\\\\\\\\').gsub('"', '\"')

0 commit comments

Comments
 (0)