aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/exception/fixtures/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/exception/fixtures/common.rb')
-rw-r--r--spec/ruby/core/exception/fixtures/common.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/ruby/core/exception/fixtures/common.rb b/spec/ruby/core/exception/fixtures/common.rb
index 9ddabace11..0ffb3ed855 100644
--- a/spec/ruby/core/exception/fixtures/common.rb
+++ b/spec/ruby/core/exception/fixtures/common.rb
@@ -46,6 +46,26 @@ module ExceptionSpecs
""
end
end
+
+ class InitializeException < StandardError
+ attr_reader :ivar
+
+ def initialize(message = nil)
+ super
+ @ivar = 1
+ end
+
+ def initialize_copy(other)
+ super
+ ScratchPad.record object_id
+ end
+ end
+
+ module ExceptionModule
+ def repr
+ 1
+ end
+ end
end
module NoMethodErrorSpecs