lib/when_exe/parts/enumerator.rb in when_exe-0.3.2 vs lib/when_exe/parts/enumerator.rb in when_exe-0.3.3

- old
+ new

@@ -260,11 +260,11 @@ private def _range(args) if (args[0].instance_of?(Range)) range, @count_limit, others = args - raise ArgumentError, "Too many arguments" if (others) + raise ArgumentError, "Too many arguments" if others @first = When.when?(range.first) @last = When.when?(range.last) @exdate |= @last if (range.exclude_end?) if (@first > @last) @first, @last = @last, @first @@ -272,11 +272,11 @@ else @direction = :forward end else @first, @direction, @count_limit, others = args - raise ArgumentError, "Too many arguments" if (others) - raise ArgumentError, "Too few arguments" unless (@first) + raise ArgumentError, "Too many arguments" if others + raise ArgumentError, "Too few arguments" unless @first @direction ||= :forward @last = nil end end