Sha256: c5dd40c7c9fa4e5bd725e9b22407ab0ef86a6e4d844b9a600e634142057c158d
Contents?: true
Size: 291 Bytes
Versions: 18
Compression:
Stored size: 291 Bytes
Contents
def foo(n) if n.respond_to?(:times) n.times {|_| n = :sym } elsif n.respond_to?(:+) n + "foo" else n & false end end foo(1) foo("str") foo(true) # no error expected __END__ # Classes class Object def foo : (Integer | String | true) -> (Integer | String | bool) end
Version data entries
18 entries across 18 versions & 1 rubygems