summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matz Matsumoto <[email protected]>2012-11-03 08:28:48 +0900
committerYukihiro Matz Matsumoto <[email protected]>2012-11-03 08:28:48 +0900
commit52f7e8372651036847dc3a4a765f4d25d2bb4665 (patch)
tree8b0f8584a521f52f63e2afb291b142097bf247df /src
parent2e0aa29296a4ab8ef370bd64b311fd0b86b748d1 (diff)
downloadmruby-52f7e8372651036847dc3a4a765f4d25d2bb4665.tar.gz
mruby-52f7e8372651036847dc3a4a765f4d25d2bb4665.zip
Module#dup should copy class methods as well
Diffstat (limited to 'src')
-rw-r--r--src/kernel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kernel.c b/src/kernel.c
index 2d1c731a2..927916b8a 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -1117,4 +1117,5 @@ mrb_init_kernel(mrb_state *mrb)
#endif
mrb_include_module(mrb, mrb->object_class, mrb->kernel_module);
+ mrb_alias_method(mrb, mrb->module_class, mrb_intern(mrb, "dup"), mrb_intern(mrb, "clone"));
}