Skip to content

Commit

Permalink
Include Enumerable into ShortenerList for Ruby 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mudge committed Nov 21, 2015
1 parent 054894f commit 06cc1a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/embiggen/shortener_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module Embiggen
class ShortenerList
extend Forwardable
extend Enumerable
include Enumerable

attr_reader :domains

Expand Down
6 changes: 6 additions & 0 deletions spec/embiggen/shortener_list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,10 @@
expect(list).to include(URI('http://a.com/foo'))
end
end

it 'is enumerable for 1.8 compatiblity' do
list = described_class.new([])

expect(list).to be_kind_of(Enumerable)
end
end

0 comments on commit 06cc1a4

Please sign in to comment.