Sha256: 9a84ab47eb8303babe6dc7a56b4f63427bdee7315a08d5abf6fd296c02bdac71

Contents?: true

Size: 520 Bytes

Versions: 11

Compression:

Stored size: 520 Bytes

Contents

def foo(k:)
end

h = { k: 42 }
foo(**h)

def bar(int:, str:)
end

if rand < 0.5
  h = { int: 42 }
else
  h = { str: "str" }
end
bar(**h)

def baz(**kw)
end

if rand < 0.5
  h = { int: 42 }
else
  h = { str: "str" }
end
baz(**h)

def qux(**kw)
end

qux(**any)

__END__
# Errors
smoke/kwsplat1.rb:30: [error] undefined method: Object#any

# Classes
class Object
  private
  def foo: (k: Integer) -> nil
  def bar: (int: Integer, str: String) -> nil
  def baz: (**Integer | String) -> nil
  def qux: (**untyped) -> nil
end

Version data entries

11 entries across 11 versions & 1 rubygems

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