summaryrefslogtreecommitdiff
path: root/spec/ruby/core/class
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2024-02-15 13:00:32 +0900
committerYusuke Endoh <mame@ruby-lang.org>2024-02-15 18:42:31 +0900
commit8259f35adc67ab34bb521f0e8a298fb00629b958 (patch)
treeb7ddb8c804334616362def40f380a29b3ffca6ea /spec/ruby/core/class
parent25d74b9527cd525042ad0b612b794fa331d3a318 (diff)
ruby-spec: Accept both a backtick and a single quote in error messages
Diffstat (limited to 'spec/ruby/core/class')
-rw-r--r--spec/ruby/core/class/attached_object_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/class/attached_object_spec.rb b/spec/ruby/core/class/attached_object_spec.rb
index d97f9cc93e..f1c0f63a44 100644
--- a/spec/ruby/core/class/attached_object_spec.rb
+++ b/spec/ruby/core/class/attached_object_spec.rb
@@ -23,9 +23,9 @@ ruby_version_is '3.2' do
end
it "raises TypeError for special singleton classes" do
- -> { nil.singleton_class.attached_object }.should raise_error(TypeError, /`NilClass' is not a singleton class/)
- -> { true.singleton_class.attached_object }.should raise_error(TypeError, /`TrueClass' is not a singleton class/)
- -> { false.singleton_class.attached_object }.should raise_error(TypeError, /`FalseClass' is not a singleton class/)
+ -> { nil.singleton_class.attached_object }.should raise_error(TypeError, /[`']NilClass' is not a singleton class/)
+ -> { true.singleton_class.attached_object }.should raise_error(TypeError, /[`']TrueClass' is not a singleton class/)
+ -> { false.singleton_class.attached_object }.should raise_error(TypeError, /[`']FalseClass' is not a singleton class/)
end
end
end