# https://github.com/opal/opal/issues/1110, fixed in Opal 0.9 unless Opal::RSpec::Compatibility.class_within_class_new_works? class ExpiredInstanceInterface def foo; end def bar; end def bazz; end end class ExpiredClassInterface def self.foo; end def self.bar; end def self.bazz; end end class ExampleClass def hello :hello_defined_on_class end end module MethodMissing remove_method :method_missing rescue nil def method_missing(m, *a, &b) if m == :captured_by_method_missing "response generated by method missing" else super(m, *a, &b) end end end class Foo def self.foo bar rescue StandardError end end class OutOfGas < StandardError attr_reader :amount, :units def initialize(amount, units) @amount = amount @units = units end end end