* eval.c (rb_eval): should handle when in else clause. a patch
from Eric Hodel <drbrain at segment7.net>. [ruby-core:08662] * parse.y (primary): wrap with NODE_CASE. [ruby-core:08663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
965b0d3807
commit
8581164ea6
@ -15,6 +15,13 @@ Sat Sep 2 12:00:32 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
|||||||
instead of String#[](idx) to check utf BOM. follows String#[](idx)
|
instead of String#[](idx) to check utf BOM. follows String#[](idx)
|
||||||
behavior change of 1.9.
|
behavior change of 1.9.
|
||||||
|
|
||||||
|
Sat Sep 2 11:47:58 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_eval): should handle when in else clause. a patch
|
||||||
|
from Eric Hodel <drbrain at segment7.net>. [ruby-core:08662]
|
||||||
|
|
||||||
|
* parse.y (primary): wrap with NODE_CASE. [ruby-core:08663]
|
||||||
|
|
||||||
Fri Sep 1 22:07:04 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Sep 1 22:07:04 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* ruby.h (RSTRING_EMBED_LEN_MASK): uses 5 bits to support 64bit
|
* ruby.h (RSTRING_EMBED_LEN_MASK): uses 5 bits to support 64bit
|
||||||
|
19
eval.c
19
eval.c
@ -2861,25 +2861,12 @@ rb_eval(VALUE self, NODE *n)
|
|||||||
}
|
}
|
||||||
goto again;
|
goto again;
|
||||||
|
|
||||||
case NODE_WHEN:
|
|
||||||
while (node) {
|
|
||||||
if (nd_type(node) != NODE_WHEN) goto again;
|
|
||||||
EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node->nd_head, self,
|
|
||||||
ruby_frame->this_func,
|
|
||||||
ruby_frame->this_class);
|
|
||||||
if (when_check(node->nd_head, Qundef, self)) {
|
|
||||||
node = node->nd_body;
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
node = node->nd_next;
|
|
||||||
}
|
|
||||||
RETURN(Qnil);
|
|
||||||
|
|
||||||
case NODE_CASE:
|
case NODE_CASE:
|
||||||
{
|
{
|
||||||
VALUE val;
|
VALUE val = Qundef;
|
||||||
|
|
||||||
val = rb_eval(self, node->nd_head);
|
if (node->nd_head)
|
||||||
|
val = rb_eval(self, node->nd_head);
|
||||||
node = node->nd_body;
|
node = node->nd_body;
|
||||||
while (node) {
|
while (node) {
|
||||||
if (nd_type(node) != NODE_WHEN) {
|
if (nd_type(node) != NODE_WHEN) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user