Skip to content

Instantly share code, notes, and snippets.

@chrismear
Forked from james/gist:175877
Created August 26, 2009 22:17
Show Gist options
  • Save chrismear/175887 to your computer and use it in GitHub Desktop.
Save chrismear/175887 to your computer and use it in GitHub Desktop.
class Test
def test
hash = {:entry => ""}
array = []
array << self.test2(hash.dup)
array << self.test2(hash.dup)
array << self.test2(hash.dup)
array << self.test2(hash.dup)
array << self.test2(hash.dup)
array
end
def test2(hash)
hash[:entry] += "Test"
hash
end
end
p Test.new.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment