lib/surrounded.rb in surrounded-0.9.1 vs lib/surrounded.rb in surrounded-0.9.2

- old
+ new

@@ -9,22 +9,18 @@ # to other objects in the context. module Surrounded private - def store_context(ctxt, &block) + def store_context(&block) accessor = block.binding.eval('self') - if accessor.role_player?(self) - surroundings.unshift(ctxt) - end + surroundings.unshift(accessor) self end def remove_context(&block) accessor = block.binding.eval('self') - if accessor.role_player?(self) - surroundings.shift - end + surroundings.shift if surroundings.include?(accessor) self end def surroundings @__surroundings__ ||= []