Skip to content

Commit

Permalink
use singleton_class method from ruby 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nashby authored and joshuaclayton committed Mar 27, 2012
1 parent 266b1d6 commit 08d01c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/factory_girl/evaluator.rb
Expand Up @@ -22,9 +22,8 @@ def initialize(build_strategy, overrides = {})
@overrides = overrides
@cached_attributes = overrides

singleton = class << self; self end
@overrides.each do |name, value|
singleton.send :define_method, name, lambda { value }
singleton_class.send :define_method, name, lambda { value }
end

@build_strategy.add_observer(CallbackRunner.new(self.class.callbacks, self))
Expand Down

0 comments on commit 08d01c1

Please sign in to comment.