diff options
| author | Masaki Muranaka <[email protected]> | 2012-07-16 17:54:13 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2012-07-16 17:58:20 +0900 |
| commit | cd502421462db2ad588cf8fe8c80a590f3d6f640 (patch) | |
| tree | 54c3782085b48c44a30eeb672354d2c120d857ac /src/vm.c | |
| parent | 49cac5f97db1398776e99573a62a300e3ab12ce7 (diff) | |
| download | mruby-cd502421462db2ad588cf8fe8c80a590f3d6f640.tar.gz mruby-cd502421462db2ad588cf8fe8c80a590f3d6f640.zip | |
Reduce strlen(). refs #301
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -892,8 +892,8 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) struct REnv *e = uvenv(mrb, lv-1); if (!e) { mrb_value exc; - const char *m = "super called outside of method"; - exc = mrb_exc_new(mrb, E_NOMETHOD_ERROR, m, strlen(m)); + static const char m[] = "super called outside of method"; + exc = mrb_exc_new(mrb, E_NOMETHOD_ERROR, m, sizeof(m) - 1); mrb->exc = (struct RObject*)mrb_object(exc); goto L_RAISE; } |
