[#6660] Ruby on Neko ? — Nicolas Cannasse <ncannasse@...>

Hi folks,

14 messages 2005/11/19

[#6672] testing for hardlink with "test(?-, ...)" flawed on Windows — noreply@...

Bugs item #2858, was opened at 2005-11-20 16:35

13 messages 2005/11/20

[#6684] semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...>

Hi all,

81 messages 2005/11/21
[#6685] Re: semenatics of if/unless/while statement modifiers — Mauricio Fern疣dez <mfp@...> 2005/11/22

On Tue, Nov 22, 2005 at 08:22:59AM +0900, Stefan Kaes wrote:

[#6686] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

Mauricio Fern疣dez wrote:

[#6687] Re: semenatics of if/unless/while statement modifiers — Eric Hodel <drbrain@...7.net> 2005/11/22

On Nov 21, 2005, at 4:37 PM, Stefan Kaes wrote:

[#6689] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

Eric Hodel wrote:

[#6693] Re: semenatics of if/unless/while statement modifiers — Yukihiro Matsumoto <matz@...> 2005/11/22

Hi,

[#6695] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

Yukihiro Matsumoto wrote:

[#6718] Re: semenatics of if/unless/while statement modifiers — mathew <meta@...> 2005/11/22

[#6722] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

mathew wrote:

[#6707] Re: semenatics of if/unless/while statement modifiers — "David A. Black" <dblack@...> 2005/11/22

Hi --

[#6708] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

David A. Black wrote:

[#6714] Re: semenatics of if/unless/while statement modifiers — "David A. Black" <dblack@...> 2005/11/22

Hi --

[#6717] Re: semenatics of if/unless/while statement modifiers — Stefan Kaes <skaes@...> 2005/11/22

David A. Black wrote:

[#6798] ruby 1.8.4 preview2 — Yukihiro Matsumoto <matz@...>

Hi,

37 messages 2005/11/30

Re: Wildness: Purpose of NOEX_PUBLIC Flag in rb_add_method?

From: "Charles E. Thornton" <ruby-core@...>
Date: 2005-11-15 00:37:07 UTC
List: ruby-core #6622
Charles E. Thornton wrote:

> Nikolai Weibull wrote:
>
>> Charles E. Thornton wrote:
>>
>>  
>>
>>> Several Different references to 'noex'
>>> rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
>>> (noex == NOEX_PUBLIC)
>>> noex = NOEX_PRIVATE | noex;
>>> NOEX_WITH_SAFE(noex)
>>>   
>>
>>
>> NOEX_PUBLIC seems to be the flag for saying that a method is public,
>> just as NOEX_PRIVATE and NOEX_PROTECTED say that it is private and
>> protected.  But that seems obvious, so perhaps I don't understand your
>> question (or I don't understand the flag correctly ;-).
>>
>>        nikolai
>>
>>  
>>
> That's what I thought --- But I wanted to make sure -- I am trying to 
> translate the
> Hackers Guide and it tends to be more of a job of researching each 
> heading from
> scratch -- Thank you.
>
>             chuck
>
>
I looked further:

        if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
        noex = NOEX_PRIVATE;
        }
        else if (SCOPE_TEST(SCOPE_PROTECTED)) {
        noex = NOEX_PROTECTED;
        }
        else {
        noex = NOEX_PUBLIC;
        }

UP TO HERE -- OK
        if (body && origin == ruby_class && body->nd_body == 0) {
        noex |= NOEX_NOSUPER;
        }

What does NOEX_NOSUPER Represent?

        defn = copy_node_scope(node->nd_defn, ruby_cref);
        rb_add_method(ruby_class, node->nd_mid, defn, noex);

HERE I get confused AGAIN -- We have already ADDED THE METHOD
and now WE ADD a second one?    What is  SCOPE_MODFUNC represent?

        if (scope_vmode == SCOPE_MODFUNC) {
        rb_add_method(rb_singleton_class(ruby_class),
                  node->nd_mid, defn, NOEX_PUBLIC);
        }


-- 
GodFather -- 667 Neighbor of the Beast


In This Thread