[#5563] Non-overridable and non-redefinable methods — Eric Mahurin <eric_mahurin@...>

Lately, I've been thinking about the future of ruby

44 messages 2005/08/19
[#5564] Re: Non-overridable and non-redefinable methods — Austin Ziegler <halostatue@...> 2005/08/19

On 8/19/05, Eric Mahurin <eric_mahurin@yahoo.com> wrote:

[#5571] Re: Non-overridable and non-redefinable methods — Eric Mahurin <eric_mahurin@...> 2005/08/19

--- Austin Ziegler <halostatue@gmail.com> wrote:

[#5574] Re: Non-overridable and non-redefinable methods — TRANS <transfire@...> 2005/08/20

Just wanted to add a few things.

[#5581] Re: Non-overridable and non-redefinable methods — Austin Ziegler <halostatue@...> 2005/08/20

On 8/19/05, TRANS <transfire@gmail.com> wrote:

[#5583] Re: Non-overridable and non-redefinable methods — "David A. Black" <dblack@...> 2005/08/20

Hi --

[#5585] Re: Non-overridable and non-redefinable methods — Eric Mahurin <eric_mahurin@...> 2005/08/20

--- "David A. Black" <dblack@wobblini.net> wrote:

[#5609] Pathname#walk for traversing path nodes (patch) — ES <ruby-ml@...>

Here is a small addition to Pathname against 1.9, probably suited

20 messages 2005/08/22

[BUG] incorrect parse in 1.9; [PATCH] included

From: Mauricio Fernandez <mfp@...>
Date: 2005-08-07 16:26:37 UTC
List: ruby-core #5535
One of the f_larglist productions is broken: it makes ruby parse invalid
expressions as shown below:

$ ~/ruby1.9/bin/ruby -ve "b = 1; ->a, , &b *c  {}; p 1 "
ruby 1.9.0 (2005-08-06) [i686-linux]
1

Proposed fix:


--- parse.y.orig        2005-08-07 17:41:44.000000000 +0200
+++ parse.y     2005-08-07 18:10:08.000000000 +0200
@@ -3208,7 +3208,7 @@
                        $$ = dispatch4(params, $1, Qnil, Qnil, Qnil);
                    %*/
                    }
-               | f_arg ',' opt_f_block_arg f_rest_arg opt_bv_decl
+               | f_arg ',' f_rest_arg opt_f_block_arg opt_bv_decl
                    {
                    /*%%%*/
                        $$ = NEW_LAMBDA(new_args($1, 0, $3, $4), $5);



After applying the patch:

$ ./ruby -ve "b = 1; ->a, , &b *c  {}.call(1)"
ruby 1.9.0 (2005-08-06) [i686-linux]
-e:1: syntax error
b = 1; ->a, , &b *c  {}.call(1)
             ^
-e:1: warning: useless use of * in void context
$ ./ruby -ve "b = 1; ->a, *c  {}.call(1)"
ruby 1.9.0 (2005-08-06) [i686-linux]
$ ./ruby -ve "b = 1; ->a, *c  {p a, :X, *c}.call(1,2,3,4)"
ruby 1.9.0 (2005-08-06) [i686-linux]
1
:X
2
3
4

-- 
Mauricio Fernandez

In This Thread

Prev Next