[#5218] Ruby Book Eng tl, ch1 question — Jon Babcock <jon@...>

13 messages 2000/10/02

[#5404] Object.foo, setters and so on — "Hal E. Fulton" <hal9000@...>

OK, here is what I think I know.

14 messages 2000/10/11

[#5425] Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...>

18 messages 2000/10/11
[#5427] RE: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — OZAWA -Crouton- Sakuro <crouton@...> 2000/10/11

At Thu, 12 Oct 2000 03:49:46 +0900,

[#5429] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Jon Babcock <jon@...> 2000/10/11

Thanks for the input.

[#5432] Re: Ruby Book Eng. tl, 9.8.11 -- seishitsu ? — Yasushi Shoji <yashi@...> 2000/10/11

At Thu, 12 Oct 2000 04:53:41 +0900,

[#5516] Re: Some newbye question — ts <decoux@...>

>>>>> "D" == Davide Marchignoli <marchign@di.unipi.it> writes:

80 messages 2000/10/13
[#5531] Re: Some newbye question — matz@... (Yukihiro Matsumoto) 2000/10/14

Hi,

[#5544] Re: Some newbye question — Davide Marchignoli <marchign@...> 2000/10/15

On Sat, 14 Oct 2000, Yukihiro Matsumoto wrote:

[#5576] Re: local variables (nested, in-block, parameters, etc.) — Dave Thomas <Dave@...> 2000/10/16

matz@zetabits.com (Yukihiro Matsumoto) writes:

[#5617] Re: local variables (nested, in-block, parameters, etc.) — "Brian F. Feldman" <green@...> 2000/10/16

Dave Thomas <Dave@thomases.com> wrote:

[#5705] Dynamic languages, SWOT ? — Hugh Sasse Staff Elec Eng <hgs@...>

There has been discussion on this list/group from time to time about

16 messages 2000/10/20
[#5712] Re: Dynamic languages, SWOT ? — Charles Hixson <charleshixsn@...> 2000/10/20

Hugh Sasse Staff Elec Eng wrote:

[#5882] [RFC] Towards a new synchronisation primitive — hipster <hipster@...4all.nl>

Hello fellow rubyists,

21 messages 2000/10/26

[ruby-talk:5795] Re: local variables (nested, in-block, parameters, etc.)

From: ts <decoux@...>
Date: 2000-10-23 15:45:10 UTC
List: ruby-talk #5795
>>>>> "G" == Guy N Hurst <gnhurst@hurstlinks.com> writes:

G> I can see you are much more advanced than I, and know the source well.

 I know nothing, I just ask ruby what it do. You'll see :

pigeon% cat b.rb
#!./ruby
require 'ii'
dump
b = 2
p "#{b}"
[[3, 4]].each do <a> |b|
      p "#{a} -- #{b}"
end
p "#{b}"
pigeon%

pigeon% b.rb
eval_tree
BLOCK
  NEWLINE <./b.rb:2>
  FCALL require 
    ARRAY
      STR "ii"
  NEWLINE <./b.rb:3>
  VCALL dump 
  NEWLINE <./b.rb:4>
  LASGN b
    LIT 2
  NEWLINE <./b.rb:5>
  FCALL p 
    ARRAY
      DSTR "" .  "b" .
  NEWLINE <./b.rb:6>
  ITER
  nd_iter
    CALL each 
      ARRAY
        ARRAY
          LIT 3
          LIT 4 ()
  nd_var
    MASGN
      ARRAY
        DASGN_CURR a
      LASGN b
  nd_body
    NEWLINE <./b.rb:7>
    FCALL p 
      ARRAY
        DSTR "" .  "a" . " -- " . "b" .
  NEWLINE <./b.rb:9>
  FCALL p 
    ARRAY
      DSTR "" .  "b" .
 
"2"
"3 -- 4"
"4"
pigeon% 


 and :

pigeon% cat b.rb
#!./ruby
require 'ii'
dump
def toto(a)
   p "1 #{a}"
   do(a = a, b = 2)
      p "2 #{a}, #{b}"
      do a = a + 2, b = a + 10
         p "3 #{a}, #{b}"
      end
      p "4 #{a}, #{b}"
   end
   p "5 #{a}"
end
pigeon%

pigeon% b.rb
eval_tree
BLOCK
  NEWLINE <./b.rb:2>
  FCALL require 
    ARRAY
      STR "ii"
  NEWLINE <./b.rb:3>
  VCALL dump 
  NEWLINE <./b.rb:4>
 
  DEFN toto 
    SCOPE
      BLOCK
        ARGS (a)
        NEWLINE <./b.rb:5>
        FCALL p 
          ARRAY
            DSTR "1 " .  "a" .
        NEWLINE <./b.rb:12>
        DO
          BLOCK
            DASGN_CURR a
              LVAR a
            DASGN_CURR b
              LIT 2
          BLOCK
            NEWLINE <./b.rb:7>
            FCALL p 
              ARRAY
                DSTR "2 " .  "a" . ", " . "b" .
            NEWLINE <./b.rb:10>
            DO
              BLOCK
                DASGN_CURR a
                  CALL + 
                    DVAR2 a
                    ARRAY
                      LIT 2
                DASGN_CURR b
                  CALL + 
                    DVAR2 a
                    ARRAY
                      LIT 10
              NEWLINE <./b.rb:9>
              FCALL p 
                ARRAY
                  DSTR "3 " .  "a" . ", " . "b" .
            NEWLINE <./b.rb:11>
            FCALL p 
              ARRAY
                DSTR "4 " .  "a" . ", " . "b" .
        NEWLINE <./b.rb:13>
        FCALL p 
          ARRAY
            DSTR "5 " .  "a" .
 
 
pigeon% 



Guy Decoux

p.s. : if you are interested, the extension 'ii' is in fl.tar.gz

In This Thread