Sha256: f896fd30470145adef216098d0190821659b175869c659590274f36d5f74fcb2
Contents?: true
Size: 1.29 KB
Versions: 12
Compression:
Stored size: 1.29 KB
Contents
type-inference --test=MegamorphicObject.InfinityLoop --should-be=Fixnum def f(a) a = [] a = [] a = [] a = [] a = [] f(a) 1 end f([])_|_ EOF type-inference --test=Hash.OpElementAssign --should-be=String a = {} b = (a[''] ||= {}) b[''] = '' a['']['']_|_ EOF type-inference --test=Pathname --should-be=Pathname class Pathname def initialize(path) @path = path end def sub(pattern, *rest, &block) @path.sub(pattern) {} end def parent self + '..' end def +(other) other = Pathname.new(other) end def find(&block) self.class.new(@path.sub('', '')) end end Pathname.new('')_|_ EOF type-inference --test=InstVar.ArrayMegamorphism1 --should-be=Array class C def f @a = [] @a = [] @a = [] @a = [] @a = [] @a = [] @a_|_ end end EOF type-inference --test=InstVar.ArrayMegamorphism2 --should-be=Fixnum class C def f b = [] @a = b @a = [] @a = [] @a = [] @a = [] @a = [] b << 1 @a.first_|_ end end EOF type-inference --test=InstVar.ArrayMegamorphism3 --should-be=Object class C def f @a = [1] @a = [''] @a = [2.3] @a = [:a] @a = [[]] @a = [{}] @a_|_ end end EOF type-inference --test=ClassForModule --should-be=Fixnum class C def self.foo() 1 end end C.foo_|_ EOF
Version data entries
12 entries across 12 versions & 1 rubygems