summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-14 13:07:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-14 13:07:04 +0000
commitf843f09b066c9c3642254f5e42b0717371487847 (patch)
treea6b43a29338feefdef6c9716b311ce068e91d495 /eval.c
parent70607ee9434fc8911fe78f938e247cf65100c6d9 (diff)
* eval.c (DMETHOD_P): accessing wrong frame. [ruby-dev:28181]
* eval.c (proc_invoke): preserve FRAME_DMETH flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 1934b0d8be..fcac54b7ae 100644
--- a/eval.c
+++ b/eval.c
@@ -843,7 +843,7 @@ struct RVarmap *ruby_dyna_vars;
#define DVAR_DONT_RECYCLE FL_USER2
-#define DMETHOD_P() (ruby_frame->prev ? (ruby_frame->prev->flags & FRAME_DMETH) : 0)
+#define DMETHOD_P() (ruby_frame->flags & FRAME_DMETH)
static struct RVarmap*
new_dvar(id, value, prev)
@@ -8435,6 +8435,7 @@ proc_invoke(proc, args, self, klass)
if (self != Qundef) _block.frame.self = self;
if (klass) _block.frame.last_class = klass;
_block.frame.argc = RARRAY(tmp)->len;
+ _block.frame.flags = ruby_frame->flags;
if (_block.frame.argc && (ruby_frame->flags & FRAME_DMETH)) {
NEWOBJ(scope, struct SCOPE);
OBJSETUP(scope, tmp, T_SCOPE);
td>* parse.y (arg): rescue_mod is in inverse order from othernobu 2011-02-06* parse.y (words, qwords): dispatch array events. based on anobu 2011-02-05* parse.y (mlhs_basic): include mlhs_post for ripper. a patchnobu 2010-12-26* parse.y (stmt): missing ripper rule. i.e., `a::B ||= c 1'.nobu 2010-12-14 * test/ripper/test_parser_events.rb (TestRipper#test_block_variables):kosaki 2010-06-23Clean warnings: unused variables.naruse 2010-04-26* parse.y (ripper_get_value): escape Qundef.nobu 2010-04-22* test/ripper/test_parser_events.rb: more regexp literal tests.nobu 2010-04-22* test/ripper/test_parser_events.rb (test_unterminated_regexp):nobu 2010-04-22* test/ripper/test_parser_events.rb (test_local_variables): for r27431.nobu 2010-04-22* test/ripper/test_parser_events.rb (test_operator_ambiguous): new test.nobu 2010-01-25supress warnings.akr 2009-12-08* test/ripper/test_parser_events.rb: more tests.nobu 2009-10-20* test/ripper/test_*.rb: fixed indent.nobu 2009-10-20* parse.y (method_call): dispatch symbols. a patch from Andy Keep innobu 2009-10-20* parse.y (mlhs_basic): fixed handling splat in middle of mlhs. anobu 2009-10-20* parse.y (parser_here_document): dispatch delayed heredocnobu 2009-10-03* parse.y (bv_decls, bvar): fix for block variables.nobu 2009-10-02* test/ripper/dummyparser.rb (DummyParser): improvement by Magnusnobu 2009-10-02* parse.y (ripper_yylval_id, ripper_get_{id,value}): wrap ID bynobu