Sha256: 4fc4b48e0c2ce968c7b4bbd2f891c07478a39bb0c4e48479f0c75e5c26528145

Contents?: true

Size: 1.37 KB

Versions: 11

Compression:

Stored size: 1.37 KB

Contents

StringArray = ["str"] + ["str"]

def f1(&blk)
  yield *StringArray
  blk
end
def log1(a, r, c); end
f1 do |a, *r, c|
  log1(a, r, c)
end

def f2(&blk)
  yield :a, *StringArray
  blk
end
def log2(a, r, c); end
f2 do |a, *r, c|
  log2(a, r, c)
end

def f3(&blk)
  yield :a, :b, *StringArray
  blk
end
def log3(a, r, c); end
f3 do |a, *r, c|
  log3(a, r, c)
end

def f4(&blk)
  yield :a, :b, :c, *StringArray
  blk
end
def log4(a, r, c); end
f4 do |a, *r, c|
  log4(a, r, c)
end

def f5(&blk)
  yield :a, :b, :c, :d, *StringArray
  blk
end
def log5(a, r, c); end
f5 do |a, *r, c|
  log5(a, r, c)
end

__END__
# Classes
class Object
  StringArray: Array[String]

  private
  def f1: { (*String) -> nil } -> ^(String, *String, String) -> nil
  def log1: (String a, Array[String] r, String c) -> nil
  def f2: { (:a, *String) -> nil } -> ^(:a, *String, String) -> nil
  def log2: (:a a, Array[String] r, String c) -> nil
  def f3: { (:a, :b, *String) -> nil } -> (^(:a, *:b | String, :b | String) -> nil)
  def log3: (:a a, Array[:b | String] r, :b | String c) -> nil
  def f4: { (:a, :b, :c, *String) -> nil } -> (^(:a, *:b | :c | String, :c | String) -> nil)
  def log4: (:a a, Array[:b | :c | String] r, :c | String c) -> nil
  def f5: { (:a, :b, :c, :d, *String) -> nil } -> (^(:a, *:b | :c | :d | String, :d | String) -> nil)
  def log5: (:a a, Array[:b | :c | :d | String] r, :d | String c) -> nil
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
typeprof-0.20.0 smoke/block-args2-rest.rb
typeprof-0.15.3 smoke/block-args2-rest.rb
typeprof-0.15.2 smoke/block-args2-rest.rb
typeprof-0.15.1 smoke/block-args2-rest.rb
typeprof-0.15.0 smoke/block-args2-rest.rb
typeprof-0.14.1 smoke/block-args2-rest.rb
typeprof-0.14.0 smoke/block-args2-rest.rb
typeprof-0.13.0 smoke/block-args2-rest.rb
typeprof-0.12.0 smoke/block-args2-rest.rb
typeprof-0.11.0 smoke/block-args2-rest.rb
typeprof-0.10.0 smoke/block-args2-rest.rb