Sha256: b71f1c75b9274070817dd3091de86583e2229d5a991a11a7adab9fc3908b3d30

Contents?: true

Size: 803 Bytes

Versions: 21

Compression:

Stored size: 803 Bytes

Contents

# frozen_string_literal: true

class ExceptionMethod
  def to_s
    'Exception Method fixture'
  end

  def raise_exception
    raise 'Exception occurred in raise_exception'
  end
end

# subclass from BasicObject so we don't get #to_s. Requires some
# hackery to implement the other methods normally provided by Object.
class NoToSMethod < BasicObject
  def is_a?(*args)
    return false
  end

  def class
    return ::Class
  end

  def respond_to?(*args)
    return false
  end

  def inspect
    "NoToSMethod"
  end

  def say_hello
    "hello"
  end
end

class InspectRaises < NoToSMethod
  def inspect
    ::Kernel.raise "#to_s missing, #inspect raises"
  end

  def say_hello
    "hello"
  end
end

class ToSRaises
  def to_s
    raise "#to_s raises"
  end

  def say_hello
    "hello"
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
appmap-0.48.0 spec/fixtures/hook/exception_method.rb
appmap-0.47.1 spec/fixtures/hook/exception_method.rb
appmap-0.47.0 spec/fixtures/hook/exception_method.rb
appmap-0.46.0 spec/fixtures/hook/exception_method.rb
appmap-0.45.1 spec/fixtures/hook/exception_method.rb
appmap-0.45.0 spec/fixtures/hook/exception_method.rb
appmap-0.44.0 spec/fixtures/hook/exception_method.rb
appmap-0.43.0 spec/fixtures/hook/exception_method.rb
appmap-0.42.1 spec/fixtures/hook/exception_method.rb
appmap-0.42.0 spec/fixtures/hook/exception_method.rb
appmap-0.41.2 spec/fixtures/hook/exception_method.rb
appmap-0.41.1 spec/fixtures/hook/exception_method.rb
appmap-0.41.0 spec/fixtures/hook/exception_method.rb
appmap-0.40.0 spec/fixtures/hook/exception_method.rb
appmap-0.39.1 spec/fixtures/hook/exception_method.rb
appmap-0.39.0 spec/fixtures/hook/exception_method.rb
appmap-0.38.1 spec/fixtures/hook/exception_method.rb
appmap-0.37.2 spec/fixtures/hook/exception_method.rb
appmap-0.37.0 spec/fixtures/hook/exception_method.rb
appmap-0.36.0 spec/fixtures/hook/exception_method.rb