Numeric
Try to convert obj into an Complex, using Kernel::Complex method. Returns converted Complex or nil if obj cannot be converted for any reason.
Complex
# File lib/try_convert.rb, line 34 def Complex.try_convert obj Complex(obj) rescue nil end