Sha256: 1f5faccb3a80f5ad75224f5465d99f420478376fffa87d4ade4e096fa42f5395
Contents?: true
Size: 1.3 KB
Versions: 3
Compression:
Stored size: 1.3 KB
Contents
StringArray = ["str"] + ["str"] def f1(&blk) yield *StringArray blk end def log1(a, o, c); end f1 do |a, o=:opt, c| log1(a, o, c) end def f2(&blk) yield :a, *StringArray blk end def log2(a, o, c); end f2 do |a, o=:opt, c| log2(a, o, c) end def f3(&blk) yield :a, :b, *StringArray blk end def log3(a, o, c); end f3 do |a, o=:opt, c| log3(a, o, c) end def f4(&blk) yield :a, :b, :c, *StringArray blk end def log4(a, o, c); end f4 do |a, o=:opt, c| log4(a, o, c) end def f5(&blk) yield :a, :b, :c, :d, *StringArray blk end def log5(a, o, c); end f5 do |a, o=:opt, c| log5(a, o, c) end __END__ # Classes class Object StringArray: Array[String] private def f1: { (*String) -> nil } -> (^(String, ?:opt | String, String) -> nil) def log1: (String, :opt | String, String) -> nil def f2: { (:a, *String) -> nil } -> (^(:a, ?:opt | String, String) -> nil) def log2: (:a, :opt | String, String) -> nil def f3: { (:a, :b, *String) -> nil } -> (^(:a, ?:b | :opt, :b | String) -> nil) def log3: (:a, :b | :opt, :b | String) -> nil def f4: { (:a, :b, :c, *String) -> nil } -> (^(:a, ?:b | :opt, :b | :c) -> nil) def log4: (:a, :b | :opt, :b | :c) -> nil def f5: { (:a, :b, :c, :d, *String) -> nil } -> (^(:a, ?:b | :opt, :b | :c) -> nil) def log5: (:a, :b | :opt, :b | :c) -> nil end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
typeprof-0.9.2 | smoke/block-args1-rest.rb |
typeprof-0.9.1 | smoke/block-args1-rest.rb |
typeprof-0.9.0 | smoke/block-args1-rest.rb |