summaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/object.c b/object.c
index b2580d990..73ae3d4e2 100644
--- a/object.c
+++ b/object.c
@@ -595,7 +595,9 @@ rb_mod_initialize(argc, argv, module)
VALUE *argv;
VALUE module;
{
- rb_mod_module_eval(0, 0, module);
+ if (rb_block_given_p()) {
+ rb_mod_module_eval(0, 0, module);
+ }
return Qnil;
}