diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-17 12:25:47 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-17 12:25:47 +0000 |
commit | b982cff67c1e7e879b4532f496c40d9ebd3b1c0d (patch) | |
tree | 9f8d1c255a53e591b22b132f3dbf0f30ffd9dbeb /include | |
parent | e5d5f5a61a484c5d3993cee2c02c4f501a6f74f8 (diff) | |
download | ruby-b982cff67c1e7e879b4532f496c40d9ebd3b1c0d.tar.gz |
* 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
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/node.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |