lib/uuid4.rb in uuid4-1.3.0 vs lib/uuid4.rb in uuid4-1.3.1
- old
+ new
@@ -123,10 +123,10 @@
value
else
# Return the result of the first formatter that can decode this value
FORMATTERS.lazy.map { |formatter|
formatter.decode(value) if formatter.respond_to?(:decode)
- }.find(&:itself)
+ }.find {|value| !value.nil? }
end
end
def valid_int?(int)
int.to_s(16).rjust(32, '0') =~ Formatter::Compact::REGEXP