Created
October 18, 2010 21:42
-
-
Save seven1m/633127 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: History.txt | |
=================================================================== | |
--- History.txt (revision 26) | |
+++ History.txt (working copy) | |
@@ -1,3 +1,7 @@ | |
+== 0.3.2 2010-10-18 | |
+* 1 minor enhancement: | |
+ * Removed Object#returning in favor of Ruby's built-in Object#tap. | |
+ | |
== 0.3.1 2008-04-03 | |
* 1 minor enhancement: | |
* Added city to Address | |
Index: lib/extensions/object.rb | |
=================================================================== | |
--- lib/extensions/object.rb (revision 26) | |
+++ lib/extensions/object.rb (working copy) | |
@@ -1,6 +0,0 @@ | |
-class Object | |
- def returning(value) | |
- yield(value) | |
- value | |
- end | |
-end | |
Index: lib/faker/lorem.rb | |
=================================================================== | |
--- lib/faker/lorem.rb (revision 26) | |
+++ lib/faker/lorem.rb (working copy) | |
@@ -12,7 +12,7 @@ | |
end | |
def self.sentences(sentence_count = 3) | |
- returning([]) do |sentences| | |
+ [].tap do |sentences| | |
1.upto(sentence_count) do | |
sentences << sentence | |
end | |
@@ -24,11 +24,11 @@ | |
end | |
def self.paragraphs(paragraph_count = 3) | |
- returning([]) do |paragraphs| | |
+ [].tap do |paragraphs| | |
1.upto(paragraph_count) do | |
paragraphs << paragraph | |
end | |
end | |
end | |
end | |
-end | |
\ No newline at end of file | |
+end | |
Index: lib/faker/version.rb | |
=================================================================== | |
--- lib/faker/version.rb (revision 26) | |
+++ lib/faker/version.rb (working copy) | |
@@ -2,7 +2,7 @@ | |
module VERSION #:nodoc: | |
MAJOR = 0 | |
MINOR = 3 | |
- TINY = 1 | |
+ TINY = 2 | |
STRING = [MAJOR, MINOR, TINY].join('.') | |
end | |
Index: lib/faker.rb | |
=================================================================== | |
--- lib/faker.rb (revision 26) | |
+++ lib/faker.rb (working copy) | |
@@ -9,7 +9,6 @@ | |
require 'faker/version' | |
require 'extensions/array' | |
-require 'extensions/object' | |
module Faker | |
def self.numerify(number_string) | |
@@ -23,4 +22,4 @@ | |
def self.bothify(string) | |
self.letterify(self.numerify(string)) | |
end | |
-end | |
\ No newline at end of file | |
+end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment