Merge branch 'master' of github.com:mruby/mruby

This commit is contained in:
Yukihiro Matz Matsumoto
2013-02-20 23:15:27 +09:00
2 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -3462,9 +3462,8 @@ parse_string(parser_state *p, int term)
pushback(p, c);
if (toklen(p)) {
char msg[128];
free(s);
tokfix(p);
snprintf(msg, sizeof(msg), "unknown regexp option %s - %s",
snprintf(msg, sizeof(msg), "unknown regexp option%s - %s",
toklen(p) > 1 ? "s" : "", tok(p));
yyerror(p, msg);
}
+2 -2
View File
@@ -16,7 +16,7 @@ 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;]
f.puts %Q[ mrb_value val1, val2, ary1, ary2, test_args_hash;]
f.puts %Q[ int ai;]
g.test_rbfiles.count.times do |i|
f.puts %Q[ ai = mrb_gc_arena_save(mrb);]
@@ -29,7 +29,7 @@ MRuby.each_target do
f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));]
if not g.test_args.empty?
f.puts %Q[ mrb_value test_args_hash = mrb_hash_new_capa(mrb, #{g.test_args.length}); ]
f.puts %Q[ test_args_hash = mrb_hash_new_capa(mrb, #{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('"', '\"')