From: "Paul Brannan" <paul / atdesk.com>
....
> Perhaps it would be nice if I could get information about the current
> method being executed:
> 
>   class A
>     def b
>       thismethod.class.a
>     end
>   end
>   b = B.new
>   b.b #=> A.a

Why not do this?
  
    class A
        def self.b
              A.a
        end
   end

   b.b # => A.a



/Christoph

/PS With a bit of cheating and a cvs version you can also
create instance variables in a completely different context.
Overall I find Ruby scoping rules really brillant - once you 
get the hang of them everything makes sense ...

class A
  @@var = 5
  K     = 4
  $peak = proc { puts [@@var, K] }
  end
  
  
  class C
    define_method (:peak,$peak)
  end
  
  C.new.peak # => 5,4