Skip to content
Browse files

rename method and avoid collision with 'assignments'

  • Loading branch information...
1 parent 046ba64 commit dd11a4714dc51d78a8ba5fec42adaffc6c92ea39 @dchelimsky dchelimsky committed Mar 1, 2010
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/rspec/core/example_group.rb
View
9 lib/rspec/core/example_group.rb
@@ -202,9 +202,8 @@ def self.to_s
end
def self.let(name, &block)
- # Should we block defining method names already defined?
define_method(name) do
- assignments[name] ||= instance_eval(&block)
+ __memoized[name] ||= instance_eval(&block)
end
end
@@ -216,13 +215,13 @@ def described_class
self.class.describes
end
- def assignments
- @assignments ||= {}
+ def __memoized
+ @__memoized ||= {}
end
def __reset__
instance_variables.each { |ivar| remove_instance_variable(ivar) }
- assignments.clear
+ __memoized.clear
end
end

0 comments on commit dd11a47

Please sign in to comment.
Something went wrong with that request. Please try again.