diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-26 22:25:58 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-03-26 22:25:58 +0900 |
| commit | 66fa14a333924f0860f603e71cc2e1872e07f828 (patch) | |
| tree | e6b6f4a392027ab754b2e32ba8b0433031ee35c2 /src/state.c | |
| parent | b1bd62e047d99387ca9681e5d907713b4c94bb3e (diff) | |
| download | mruby-66fa14a333924f0860f603e71cc2e1872e07f828.tar.gz mruby-66fa14a333924f0860f603e71cc2e1872e07f828.zip | |
main.to_s should also return "main"
Diffstat (limited to 'src/state.c')
| -rw-r--r-- | src/state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c index 4e7225c7c..e84674447 100644 --- a/src/state.c +++ b/src/state.c @@ -170,6 +170,7 @@ mrb_top_self(mrb_state *mrb) if (!mrb->top_self) { mrb->top_self = (struct RObject*)mrb_obj_alloc(mrb, MRB_TT_OBJECT, mrb->object_class); mrb_define_singleton_method(mrb, mrb->top_self, "inspect", inspect_main, ARGS_NONE()); + mrb_define_singleton_method(mrb, mrb->top_self, "to_s", inspect_main, ARGS_NONE()); } return mrb_obj_value(mrb->top_self); } |
