[#8484] strptime fails to properly parse certain inputs — <noreply@...>

Bugs item #5263, was opened at 2006-08-01 23:14

13 messages 2006/08/02
[#8485] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — Yukihiro Matsumoto <matz@...> 2006/08/02

Hi,

[#8538] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — nobu@... 2006/08/06

Hi,

[#8561] sandbox timers & block scopes — why the lucky stiff <ruby-core@...>

Two puzzles I am trying to solve:

28 messages 2006/08/08
[#8624] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

raise ThisDecayingInquisition, "anyone? anyone at all?"

[#8627] Re: sandbox timers & block scopes — MenTaLguY <mental@...> 2006/08/15

On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:

[#8628] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

On Wed, Aug 16, 2006 at 02:46:30AM +0900, MenTaLguY wrote:

[#8629] Re: sandbox timers & block scopes — "Charles O Nutter" <headius@...> 2006/08/15

On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:

[#8690] a ruby-core primer — why the lucky stiff <ruby-core@...>

Hello, all. I've been working on the ruby-core page for the new Ruby site.

21 messages 2006/08/22

Re: [BUG] NODE_WHEN inside a case else body

From: Eric Hodel <drbrain@...7.net>
Date: 2006-08-19 06:55:50 UTC
List: ruby-core #8663
On Aug 18, 2006, at 8:37 PM, Dominik Bathon wrote:

> Hi,
>
> I just found the following bug in 1.9:
>
> case false
> when 1
>   puts 1
> else
>   case
>   when true
>     puts "expected"
>   end
> end
>
> should print "expected", but it doesn't


-- 
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com


Attachments (1)

case.patch (973 Bytes, text/x-diff)
Index: eval.c
===================================================================
RCS file: /src/ruby/eval.c,v
retrieving revision 1.936
diff -u -r1.936 eval.c
--- eval.c	13 Aug 2006 09:44:15 -0000	1.936
+++ eval.c	19 Aug 2006 06:39:04 -0000
@@ -2877,9 +2877,10 @@
 
       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;
 	    while (node) {
 		if (nd_type(node) != NODE_WHEN) {
Index: parse.y
===================================================================
RCS file: /src/ruby/parse.y,v
retrieving revision 1.451
diff -u -r1.451 parse.y
--- parse.y	8 Aug 2006 03:28:58 -0000	1.451
+++ parse.y	19 Aug 2006 06:39:05 -0000
@@ -2605,7 +2605,7 @@
 		| keyword_case opt_terms case_body keyword_end
 		    {
 		    /*%%%*/
-			$$ = $3;
+			$$ = NEW_CASE(NULL, $3);
 		    /*%
 			$$ = dispatch2(case, Qnil, $3);
 		    %*/

In This Thread