Sha256: a9ccd0005b70c1fea8c8a517944e00f14956338f464b5014094a11b443e4b399

Contents?: true

Size: 229 Bytes

Versions: 11

Compression:

Stored size: 229 Bytes

Contents

def foo(n)
  case n
  when Integer
    n + 1
  when String
    n + "STR"
  else
    n
  end
end

foo(42)
foo("str")
foo(:sym)

__END__
# Classes
class Object
  def foo : (:sym | Integer | String) -> (:sym | Integer | String)
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
typeprof-0.7.0 smoke/flow7.rb
typeprof-0.6.1 smoke/flow7.rb
typeprof-0.6.0 smoke/flow7.rb
typeprof-0.5.4 smoke/flow7.rb
typeprof-0.5.3 smoke/flow7.rb
typeprof-0.5.2 smoke/flow7.rb
typeprof-0.5.1 smoke/flow7.rb
typeprof-0.5.0 smoke/flow7.rb
typeprof-0.4.2 smoke/flow7.rb
typeprof-0.4.1 smoke/flow7.rb
typeprof-0.4.0 smoke/flow7.rb