mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c (rb_singleton_class_attached): should modify iv_tbl by
itself, no longer use rb_iv_set() to avoid freeze check error. * variable.c (rb_const_get): error message "uninitialized constant Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1c907a9300
commit
eaff12d826
4 changed files with 19 additions and 12 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Apr 11 13:29:26 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* class.c (rb_singleton_class_attached): should modify iv_tbl by
|
||||
itself, no longer use rb_iv_set() to avoid freeze check error.
|
||||
|
||||
* variable.c (rb_const_get): error message "uninitialized constant
|
||||
Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo".
|
||||
|
||||
Tue Apr 10 02:24:40 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||
|
||||
* io.c (opt_i_set): should strdup() inplace_edit string.
|
||||
|
|
13
class.c
13
class.c
|
@ -112,8 +112,12 @@ void
|
|||
rb_singleton_class_attached(klass, obj)
|
||||
VALUE klass, obj;
|
||||
{
|
||||
if (FL_TEST(klass, FL_SINGLETON))
|
||||
rb_iv_set(klass, "__attached__", obj);
|
||||
if (FL_TEST(klass, FL_SINGLETON)) {
|
||||
if (!RCLASS(klass)->iv_tbl) {
|
||||
RCLASS(klass)->iv_tbl = st_init_numtable();
|
||||
}
|
||||
st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
|
||||
}
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
@ -253,11 +257,6 @@ rb_include_module(klass, module)
|
|||
VALUE p;
|
||||
int changed = 0;
|
||||
|
||||
rb_frozen_class_p(klass);
|
||||
if (!OBJ_TAINTED(klass)) {
|
||||
rb_secure(4);
|
||||
}
|
||||
|
||||
rb_frozen_class_p(klass);
|
||||
if (!OBJ_TAINTED(klass)) {
|
||||
rb_secure(4);
|
||||
|
|
|
@ -1084,9 +1084,9 @@ rb_const_get(klass, id)
|
|||
|
||||
/* Uninitialized constant */
|
||||
if (klass && klass != rb_cObject)
|
||||
rb_raise(rb_eNameError, "uninitialized constant %s::%s",
|
||||
RSTRING(rb_class_path(klass))->ptr,
|
||||
rb_id2name(id));
|
||||
rb_raise(rb_eNameError, "uninitialized constant %s at %s",
|
||||
rb_id2name(id),
|
||||
RSTRING(rb_class_path(klass))->ptr);
|
||||
else {
|
||||
rb_raise(rb_eNameError, "uninitialized constant %s",rb_id2name(id));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#define RUBY_VERSION "1.6.4"
|
||||
#define RUBY_RELEASE_DATE "2001-04-10"
|
||||
#define RUBY_RELEASE_DATE "2001-04-11"
|
||||
#define RUBY_VERSION_CODE 164
|
||||
#define RUBY_RELEASE_CODE 20010410
|
||||
#define RUBY_RELEASE_CODE 20010411
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue