backports 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115,8 +115,9 @@ class Enumerator
115
115
  raise ArgumentError, "tried to call lazy flat_map without a block" unless block_given?
116
116
  Lazy.new(self) do |yielder, *values|
117
117
  result = yield(*values)
118
- if ary = Backports.is_array?(result) || (result.respond_to?(:each) && result.respond_to?(:force))
119
- ary.each{|x| yielder << x }
118
+ ary = Backports.is_array?(result)
119
+ if ary || (result.respond_to?(:each) && result.respond_to?(:force))
120
+ (ary || result).each{|x| yielder << x }
120
121
  else
121
122
  yielder << result
122
123
  end
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "2.8.0"
2
+ VERSION = "2.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: