diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2024-02-15 13:00:32 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2024-02-15 18:42:31 +0900 |
commit | 8259f35adc67ab34bb521f0e8a298fb00629b958 (patch) | |
tree | b7ddb8c804334616362def40f380a29b3ffca6ea /spec/ruby/core/class | |
parent | 25d74b9527cd525042ad0b612b794fa331d3a318 (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.rb | 6 |
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 |