From b982cff67c1e7e879b4532f496c40d9ebd3b1c0d Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 17 Aug 2007 12:25:47 +0000 Subject: * eval.c (rb_call), eval_method.ci (rb_add_method, rb_alias), insnhelper.ci (vm_call_method): fix to save safelevel for method node. * include/ruby/node.h: ditto. * bootstraptest/test_method.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/node.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/ruby/node.h b/include/ruby/node.h index 73c499b61c..e3722e0c41 100644 --- a/include/ruby/node.h +++ b/include/ruby/node.h @@ -484,6 +484,10 @@ enum ruby_node_flags { #define NOEX_SUPER 0x20 #define NOEX_VCALL 0x40 +#define NOEX_SAFE(n) (((n) >> 8) & 0x0F) +#define NOEX_WITH(n, s) ((s << 8) | n) +#define NOEX_WITH_SAFE(n) NOEX_WITH(n, rb_safe_level()) + VALUE rb_parser_new(void); VALUE rb_parser_end_seen_p(VALUE); -- cgit v1.2.3