1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (cvar_cbase): singletons should refer outer cvar scope.

[ruby-dev:24223]

* eval.c (rb_load): should preserve previous ruby_wrapper value.
  [ruby-dev:24226]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2004-09-06 00:48:03 +00:00
parent 6faa93ff25
commit d58885977b
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
Mon Sep 6 07:51:42 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (cvar_cbase): singletons should refer outer cvar scope.
[ruby-dev:24223]
* eval.c (rb_load): should preserve previous ruby_wrapper value.
[ruby-dev:24226]
Sat Sep 4 01:14:57 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (cvar_cbase): class variables cause SEGV in

4
eval.c
View file

@ -1773,7 +1773,7 @@ cvar_cbase()
{
NODE *cref = ruby_cref;
while (cref && cref->nd_next && FL_TEST(cref->nd_clss, FL_SINGLETON)) {
while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
cref = cref->nd_next;
if (!cref->nd_next) {
rb_warn("class variable access from toplevel singleton method");
@ -6411,7 +6411,7 @@ rb_load(fname, wrap)
int state;
volatile int prohibit_int = rb_prohibit_interrupt;
volatile ID last_func;
volatile VALUE wrapper = 0;
volatile VALUE wrapper = ruby_wrapper;
volatile VALUE self = ruby_top_self;
NODE *volatile last_node;
NODE *saved_cref = ruby_cref;