summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-07 05:27:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-01-07 05:27:01 +0000
commit7e077c0a443eadc51e3d1b16acb9f745e248ac99 (patch)
treefcfa758386e8c8c86dc1067aaa0169e23e1bf70f /class.c
parent73728e5e8c6028c32253c656f87a6581d60417f7 (diff)
* string.c (rb_str_new2): NULL pointer check added.
* class.c (rb_define_module_under): should locate predefined module using rb_const_defined_at(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/class.c b/class.c
index ff61ab0fec..965359e8de 100644
--- a/class.c
+++ b/class.c
@@ -246,8 +246,8 @@ rb_define_module_under(outer, name)
ID id;
id = rb_intern(name);
- if (rb_const_defined(outer, id)) {
- module = rb_const_get(rb_cObject, id);
+ if (rb_const_defined_at(outer, id)) {
+ module = rb_const_get(outer, id);
if (TYPE(module) == T_MODULE)
return module;
rb_raise(rb_eTypeError, "%s::%s is not a module",