From: Dave Thomas Date: 2000-09-12T13:32:25+09:00 Subject: [ruby-talk:4883] Re-binding a block I'm probably missing something obvious, but... I'm trying to create a block within a class definition that can be bound to instances of the class, not the class itself. This code obviously doesn't work: class Dave @@block = proc { puts @name } @name = "class level" def initialize @name = "instance level" end def block @@block.call end end Dave.new.block It will always output "class level" as @name is bound at the time the block is created. Is there any way to change that binding at runtime so that I can call the block and have it output "instance level"? Dave