Merge pull request #5729 from oscardelben/use_tap

Use the more idiomatic tap method
This commit is contained in:
José Valim 2012-05-13 01:00:17 -07:00
commit 7d67880a2d

@ -255,11 +255,7 @@ def undefine_attribute_methods
# Returns true if the attribute methods defined have been generated.
def generated_attribute_methods #:nodoc:
@generated_attribute_methods ||= begin
mod = Module.new
include mod
mod
end
@generated_attribute_methods ||= Module.new.tap { |mod| include mod }
end
protected