Created
May 29, 2012 10:18
-
-
Save hugopeixoto/2823972 to your computer and use it in GitHub Desktop.
Allows for iteration of multiple enumerables
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
Gem::Specification.new do |s| | |
s.name = 'enumerable_collate' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Hugo Peixoto' | |
s.email = '[email protected]' | |
s.summary = 'Enumerable Collate' | |
s.description = 'Allows for iteration of multiple enumerables' | |
s.files = ['enumerable_collate.rb'] | |
s.require_path = '.' | |
s.add_development_dependency('rspec', ["~> 2.0"]) | |
end |
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
module Enumerable | |
def collate *other, &block | |
([self] + other).each { |enum| enum.each &block } | |
end | |
end |
Feel free to contribute :P
Checkout my fork. I suppose that was the intended behavior.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What? No tests? :P