mruby/mruby — pull request #1313 by mimaki (2013-06-27 11:30:10+00:00)
Title: ArgumentError raised when mrb_get_args(mrb, "z", ...) receives substring.

Applying the patch, fixes unnecessary exception in mrb_get_args() with "z" format.

```
static mrb_value
foo(mrb_state *mrb, mrb_value self)
{
char *p;
mrb_get_args(mrb, "z", &p);

}

void
mrb_init_foo(mrb_state *mrb)
{
mrb_define_method(mrb, mrb->object_class, "foo", foo, MRB_ARGS_REQ(1));
}
```

```
str = "ABCDE"
foo str[2] # => "xxx.rb:2: String contains NUL (ArgumentError)"
```