class Binding # Returns the value of some variable. # # require 'facet/binding/local_variables' # # a = 2 # binding["a"] #=> 2 # def []( x ) eval( x.to_s ) end # Set the value of a local variable. # # require 'facet/binding/local_variables' # # binding["a"] = 4 # a #=> 4 # def []=( l, v ) eval( "proc {|v| #{l} = v}").call( v ) end end