diff options
| -rw-r--r-- | src/parse.y | 20 | ||||
| -rw-r--r-- | src/variable.c | 1 | ||||
| -rw-r--r-- | test/driver.c | 3 | ||||
| -rw-r--r-- | tools/mirb/mirb.c | 3 |
4 files changed, 15 insertions, 12 deletions
diff --git a/src/parse.y b/src/parse.y index 62393a0bb..5c49db07e 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3457,19 +3457,19 @@ read_escape(parser_state *p) case '0': case '1': case '2': case '3': /* octal constant */ case '4': case '5': case '6': case '7': { - int buf[3]; - int i; + int buf[3]; + int i; - buf[0] = c; - for (i=1; i<3; i++) { + buf[0] = c; + for (i=1; i<3; i++) { buf[i] = nextc(p); if (buf[i] == -1) goto eof; - if (buf[i] < '0' || '7' < buf[i]) { - pushback(p, buf[i]); - break; - } - } - c = scan_oct(buf, i, &i); + if (buf[i] < '0' || '7' < buf[i]) { + pushback(p, buf[i]); + break; + } + } + c = scan_oct(buf, i, &i); } return c; diff --git a/src/variable.c b/src/variable.c index 8715505c3..4202981a4 100644 --- a/src/variable.c +++ b/src/variable.c @@ -548,6 +548,7 @@ mrb_obj_iv_inspect(mrb_state *mrb, struct RObject *obj) mrb_value str = mrb_sprintf(mrb, "-<%s:%p", cn, (void*)obj); iv_foreach(mrb, t, inspect_i, &str); + mrb_str_cat(mrb, str, ">", 1); return str; } return mrb_any_to_s(mrb, mrb_obj_value(obj)); diff --git a/test/driver.c b/test/driver.c index 5183145b4..eda82a7f2 100644 --- a/test/driver.c +++ b/test/driver.c @@ -17,7 +17,8 @@ void mrb_init_mrbtest(mrb_state *); /* Print a short remark for the user */ -void print_hint(void) +static void +print_hint(void) { printf("mrbtest - Embeddable Ruby Test\n"); printf("\nThis is a very early version, please test and report errors.\n"); diff --git a/tools/mirb/mirb.c b/tools/mirb/mirb.c index e20de629d..c20c788e4 100644 --- a/tools/mirb/mirb.c +++ b/tools/mirb/mirb.c @@ -132,7 +132,8 @@ is_code_block_open(struct mrb_parser_state *parser) } /* Print a short remark for the user */ -void print_hint(void) +static void +print_hint(void) { printf("mirb - Embeddable Interactive Ruby Shell\n"); printf("\nThis is a very early version, please test and report errors.\n"); |
