On Feb 5, 2005, at 2:16 PM, Mathieu Bouchard wrote:

> However, Ruby's reflection is missing a few things, that are present in
> languages like Tcl/Python (examining lists of local variables) or
> Scheme/Lisp/Tcl (accessing source code at runtime, as nested lists; 
> easy
> manipulation of source code)
>

Hm, I'm not sure about local variables though. The last time I checked:

$ irb
irb(main):001:0> a,b = 1,2
=> [1, 2]
irb(main):002:0> local_variables.grep(/^[^_]/) do |n|
irb(main):003:1*   puts "#{n} = #{eval n}"; n
irb(main):004:1> end
a = 1
b = 2
=> ["a", "b"]
irb(main):005:0>

Cheers
Kent.


Cheers,
Kent.