mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b1924b176
commit
837c76bd7b
4 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
Tue May 6 00:00:02 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* compile.c (iseq_compile_each): should call compile_cpath() for
|
||||
modules as well. [ruby-dev:34585]
|
||||
|
||||
* insns.def (defineclass): add undef handling.
|
||||
|
||||
Mon May 5 23:49:40 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* insns.def (defineclass): was using wrong variable. [ruby-dev:34592]
|
||||
|
|
|
@ -4310,7 +4310,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
rb_sprintf("<module:%s>", rb_id2name(node->nd_cpath->nd_mid)),
|
||||
ISEQ_TYPE_CLASS);
|
||||
|
||||
COMPILE(ret, "mbase", node->nd_cpath->nd_head);
|
||||
compile_cpath(ret, iseq, node->nd_cpath);
|
||||
ADD_INSN (ret, nd_line(node), putnil); /* dummy */
|
||||
ADD_INSN3(ret, nd_line(node), defineclass,
|
||||
ID2SYM(node->nd_cpath->nd_mid), iseqval, INT2FIX(2));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2008-05-05"
|
||||
#define RUBY_RELEASE_DATE "2008-05-06"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20080505
|
||||
#define RUBY_RELEASE_CODE 20080506
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2008
|
||||
#define RUBY_RELEASE_MONTH 5
|
||||
#define RUBY_RELEASE_DAY 5
|
||||
#define RUBY_RELEASE_DAY 6
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Reference in a new issue