Sha256: 1d4766d0ac86d748b8c90bcbecb70ccd85f862428409c5f22bcf162037c86695
Contents?: true
Size: 628 Bytes
Versions: 32
Compression:
Stored size: 628 Bytes
Contents
class A # A#foo is defined and the implementation is compatible. def foo(x) x + "" end # A#bar is defined but the implementation is incompatible. # !expects MethodArityMismatch: method=bar def bar(y) y end # Object#to_s is defined but the implementation is incompatible. # !expects MethodBodyTypeMismatch: method=to_s, expected=::String, actual=::Integer def to_s 3 end # No method definition given via signature, there is no type error. def to_str 5 end # !expects MethodBodyTypeMismatch: method=self.baz, expected=::Integer, actual=::String def self.baz "baz" end end
Version data entries
32 entries across 32 versions & 1 rubygems