diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-05 15:01:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-05 15:01:42 +0000 |
commit | 143d2c0929c2df367894c9f7e5f220e438c87a5e (patch) | |
tree | bc4f51441208baf18a4f036ebca84313efff4ae8 /insns.def | |
parent | 0110fa16448f6013c6ae415df95302e2b3a7cf1b (diff) | |
download | ruby-143d2c0929c2df367894c9f7e5f220e438c87a5e.tar.gz ruby-143d2c0929c2df367894c9f7e5f220e438c87a5e.tar.xz ruby-143d2c0929c2df367894c9f7e5f220e438c87a5e.zip |
* compile.c (iseq_compile_each): should call compile_cpath() for
modules as well. [ruby-dev:34585]
* insns.def (defineclass): add undef handling.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -972,8 +972,11 @@ defineclass case 2: /* val is dummy. classdef returns class scope value */ /* super is dummy */ - if (cbase == Qnil) { + if (cbase == Qundef) { cbase = vm_get_cbase(th); + if (NIL_P(cbase)) { + rb_raise(rb_eTypeError, "no class/module to define constant"); + } } vm_check_if_namespace(cbase); |