Sha256: 0fa5cc1bb31c42b12dda9ada8405d58512bd4035a39e28dc8bae9af5e75dc343

Contents?: true

Size: 401 Bytes

Versions: 18

Compression:

Stored size: 401 Bytes

Contents

def tuple_set
  ary = [:a, :b, :c]
  ary[-1] = :z
  ary
end

def tuple_get
  ary = [:a, :b, :c]
  ary[-1]
end

def seq_set
  ary = [:a, :b, :c] + []
  ary[-1] = :z
  ary
end

def seq_get
  ary = [:a, :b, :c] + []
  ary[-1]
end

__END__
# Classes
class Object
  def tuple_set : -> [:a, :b, :z]
  def tuple_get : -> :c
  def seq_set : -> (Array[:a | :b | :c | :z])
  def seq_get : -> (:a | :b | :c)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
typeprof-0.7.0 smoke/array13.rb
typeprof-0.6.1 smoke/array13.rb
typeprof-0.6.0 smoke/array13.rb
typeprof-0.5.4 smoke/array13.rb
typeprof-0.5.3 smoke/array13.rb
typeprof-0.5.2 smoke/array13.rb
typeprof-0.5.1 smoke/array13.rb
typeprof-0.5.0 smoke/array13.rb
typeprof-0.4.2 smoke/array13.rb
typeprof-0.4.1 smoke/array13.rb
typeprof-0.4.0 smoke/array13.rb
typeprof-0.3.0 smoke/array13.rb
typeprof-0.2.0 smoke/array13.rb
typeprof-0.1.4 smoke/array13.rb
typeprof-0.1.3 smoke/array13.rb
typeprof-0.1.2 smoke/array13.rb
typeprof-0.1.1 smoke/array13.rb
typeprof-0.1.0 smoke/array13.rb