summaryrefslogtreecommitdiffhomepage
path: root/src/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c
index 44b2049db..30b983264 100644
--- a/src/print.c
+++ b/src/print.c
@@ -73,6 +73,12 @@ mrb_show_copyright(mrb_state *mrb)
static const char copyright_msg[] = "mruby - Copyright (c) 2010-2014 mruby developers\n";
mrb_value msg;
- msg = mrb_str_new(mrb, copyright_msg, sizeof(copyright_msg) - 1);
+ if (mrb_const_defined(mrb, mrb_obj_value(mrb->object_class), mrb_intern_lit(mrb, "MRUBY_COPYRIGHT"))) {
+ msg = mrb_const_get(mrb, mrb_obj_value(mrb->object_class), mrb_intern_lit(mrb, "MRUBY_COPYRIGHT"));
+ msg = mrb_funcall(mrb, msg, "+", 1, mrb_str_new_cstr(mrb, "\n"));
+ }
+ else {
+ msg = mrb_str_new(mrb, copyright_msg, sizeof(copyright_msg) - 1);
+ }
printstr(mrb, msg);
}