[#9869] a block argument within a block which argument has the same name leaks — <noreply@...>

Bugs item #7680, was opened at 2007-01-08 22:53

34 messages 2007/01/08
[#9871] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/08

Hi,

[#9872] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Evan Webb <evan@...> 2007/01/08

On Jan 8, 2007, at 2:30 PM, Yukihiro Matsumoto wrote:

[#9873] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/08

Hi,

[#9876] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — dblack@... 2007/01/09

Hi --

[#9878] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/09

Hi,

[#9879] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — dblack@... 2007/01/09

Hi --

[#9880] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/09

Hi,

[#9882] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Evan Phoenix <evan@...> 2007/01/09

[#9885] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/09

Hi,

[#9887] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Evan Phoenix <evan@...> 2007/01/09

[#9888] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Charles Oliver Nutter <charles.nutter@...> 2007/01/09

Evan Phoenix wrote:

[#9892] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/09

Hi,

[#9899] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Charles Oliver Nutter <charles.nutter@...> 2007/01/10

Yukihiro Matsumoto wrote:

[#9904] Re: [ ruby-Bugs-7680 ] a block argument within a block which argument has the same name leaks — Yukihiro Matsumoto <matz@...> 2007/01/10

Hi,

[#9960] Scoping and locating definitions — Jos Backus <jos@...>

Consider the following:

17 messages 2007/01/18
[#9964] Re: Scoping and locating definitions — Pit Capitain <pit@...> 2007/01/19

Jos Backus schrieb:

[#9966] Re: Scoping and locating definitions — Jos Backus <jos@...> 2007/01/19

On Fri, Jan 19, 2007 at 06:40:03PM +0900, Pit Capitain wrote:

[#9972] Re: Scoping and locating definitions — Jos Backus <jos@...> 2007/01/19

On Sat, Jan 20, 2007 at 02:18:19AM +0900, Jos Backus wrote:

[#9996] new method dispatch rule (matz' proposal) — SASADA Koichi <ko1@...>

Hi,

50 messages 2007/01/23
[#10002] Re: new method dispatch rule (matz' proposal) — Daniel DeLorme <dan-ml@...42.com> 2007/01/23

SASADA Koichi wrote:

[#10003] Re: new method dispatch rule (matz' proposal) — Yukihiro Matsumoto <matz@...> 2007/01/23

Hi,

[#10004] Re: new method dispatch rule (matz' proposal) — James Edward Gray II <james@...> 2007/01/23

On Jan 23, 2007, at 7:41 AM, Yukihiro Matsumoto wrote:

[#10017] Re: new method dispatch rule (matz' proposal) — Daniel DeLorme <dan-ml@...42.com> 2007/01/24

Yukihiro Matsumoto wrote:

[#10018] Re: new method dispatch rule (matz' proposal) — Yukihiro Matsumoto <matz@...> 2007/01/24

Hi,

[#10024] Re: new method dispatch rule (matz' proposal) — Daniel DeLorme <dan-ml@...42.com> 2007/01/24

Yukihiro Matsumoto wrote:

[#10027] Re: new method dispatch rule (matz' proposal) — Yukihiro Matsumoto <matz@...> 2007/01/24

Hi,

[#10048] Re: new method dispatch rule (matz' proposal) — Evan Phoenix <evan@...> 2007/01/25

The more this discussion goes on, the more I worry that Joe Q Public

[#10019] stable branch policy & schedule for 1.8.6 — "Akinori MUSHA" <knu@...>

Core developers,

29 messages 2007/01/24
[#10021] Re: stable branch policy & schedule for 1.8.6 — Charles Oliver Nutter <charles.nutter@...> 2007/01/24

Akinori MUSHA wrote:

[#10032] Re: stable branch policy & schedule for 1.8.6 — Joel VanderWerf <vjoel@...> 2007/01/24

Charles Oliver Nutter wrote:

[#10085] Collaborative Ruby Language Specification — "John Lam (CLR)" <jflam@...>

Hi Everyone,

36 messages 2007/01/28
[#10108] Re: Collaborative Ruby Language Specification — Charles Oliver Nutter <charles.nutter@...> 2007/01/29

M. Edward (Ed) Borasky wrote:

[#10112] Re: Collaborative Ruby Language Specification — "Eustaquio Rangel de Oliveira Jr." <eustaquiorangel@...> 2007/01/30

-----BEGIN PGP SIGNED MESSAGE-----

[#10114] add usage of uri.userinfo to open-uri.rb — <noreply@...>

Patches item #8309, was opened at 2007-01-30 15:25

16 messages 2007/01/30
[#10131] Re: [ ruby-Patches-8309 ] add usage of uri.userinfo to open-uri.rb — Yukihiro Matsumoto <matz@...> 2007/01/31

[#10132] Re: [ ruby-Patches-8309 ] add usage of uri.userinfo to open-uri.rb — Paulo Kh <paulo.koch@...> 2007/01/31

On 2007/01/31, at 06:07, Yukihiro Matsumoto wrote:

[#10137] Re: [ ruby-Patches-8309 ] add usage of uri.userinfo to open-uri.rb — Yukihiro Matsumoto <matz@...> 2007/01/31

Hi,

[#10139] Re: [ ruby-Patches-8309 ] add usage of uri.userinfo to open-uri.rb — Sam Roberts <sroberts@...> 2007/01/31

On Thu, Feb 01, 2007 at 01:19:34AM +0900, Yukihiro Matsumoto wrote:

[#10143] Re: [ ruby-Patches-8309 ] add usage of uri.userinfo to open-uri.rb — Yukihiro Matsumoto <matz@...> 2007/02/01

Hi,

Re: Suggestion: Post indentation style guideline to "Rules for Core Developers"

From: Mauricio Fernandez <mfp@...>
Date: 2007-01-03 17:06:29 UTC
List: ruby-core #9844
On Mon, Jan 01, 2007 at 11:58:18PM +0900, Rob Muhlestein wrote:
> On Sun, 2006-12-31 at 15:02 +0900, Eric Hodel wrote:
> > On Dec 30, 2006, at 20:02, Rob Muhlestein wrote:
> > > What *is* the preferred indentation style for ruby core C code?
> > 
> > It appears to by four spaces with hard tabs.  All the files I've  
> > encountered have this structure.
> > 
> Really, humm, in which files specifically are you seeing the mostly hard
> tabs? I'm seeing mostly soft tabs. In fact I see very few hard tabs in
> io.c, error.c, marshal.c, regcomp.c (which also has 2 space instead of
> 4) with vi ':set list' turned on (and thanks richard for the vi rc setup
> reminders, been using them for years). Here's io.c for example:
> 
>    1883 static VALUE$
>    1884 rb_io_readline(int argc, VALUE *argv, VALUE io)$
>    1885 {$
>    1886     VALUE line = rb_io_gets_m(argc, argv, io);$
>    1887 $
>    1888     if (NIL_P(line)) {$
>    1889 ^Irb_eof_error();$
>    1890     }$
>    1891     return line;$
>    1892 }$
> 
> Notice the ^I indicating a tab on 1889 where everything
> else is using spaces. 

IIRC a mixture of hard tabs (considered as 8-space ones) and spaces is used,
with 4-space indentation for most files (regcomp.c belongs to Oniguruma
which seems to use 2-space). For a given indentation level, as many tabs as
possible are used, and up to 7 spaces are added to reach the desired
indentation.

In the above snippet, only line 1889 is indented >= 8 characters, and it's
thus the only one where a hard tab was used.

This explains it better:

$ ruby -e 'ARGF.each_with_index{|x,i| puts "%06d %s" % [i, x.gsub(/\t/,"###TAB##")]}' eval.c
...
001988 void
001989 rb_frozen_class_p(klass)
001990     VALUE klass;
001991 {
001992     char *desc = "something(?!)";
001993 
001994     if (OBJ_FROZEN(klass)) {
001995 ###TAB##if (FL_TEST(klass, FL_SINGLETON))
001996 ###TAB##    desc = "object";
001997 ###TAB##else {
001998 ###TAB##    switch (TYPE(klass)) {
001999 ###TAB##      case T_MODULE:
002000 ###TAB##      case T_ICLASS:
002001 ###TAB#####TAB##desc = "module"; break;
002002 ###TAB##      case T_CLASS:
002003 ###TAB#####TAB##desc = "class"; break;
002004 ###TAB##    }
002005 ###TAB##}
002006 ###TAB##rb_error_frozen(desc);
002007     }
002008 }

-- 
Mauricio Fernandez  -   http://eigenclass.org   -  singular Ruby

In This Thread