diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-07-04 09:38:19 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-04 09:38:19 +0200 |
| commit | 692be9e99e0a76d5f6d0b0527466998ca558fe96 (patch) | |
| tree | 7f5ea962c8a6161d7ea1dd4197027d63f317eb8e /lib | |
| parent | ec65a1586ab1a4ffaac15578fa19ff04b3caed25 (diff) | |
| parent | b2636ddaebd9fd1ecd09466b4606792da53947a5 (diff) | |
| download | caxlsx-692be9e99e0a76d5f6d0b0527466998ca558fe96.tar.gz caxlsx-692be9e99e0a76d5f6d0b0527466998ca558fe96.zip | |
Merge pull request #288 from tagliala/chore/fix-non-local-exit-from-iterator
Fix Lint/NonLocalExitFromIterator offense
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/util/validators.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/axlsx/util/validators.rb b/lib/axlsx/util/validators.rb index fd17360e..5684c9cb 100644 --- a/lib/axlsx/util/validators.rb +++ b/lib/axlsx/util/validators.rb @@ -60,9 +60,8 @@ module Axlsx end v_class = v.is_a?(Class) ? v : v.class - Array(types).each do |t| - return if v_class <= t - end + return if Array(types).any? { |t| v_class <= t } + raise ArgumentError, format(ERR_TYPE, v.inspect, name, types.inspect) end end |
