summaryrefslogtreecommitdiff
path: root/spec/ruby/core/basicobject
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/basicobject
parent25d74b9527cd525042ad0b612b794fa331d3a318 (diff)
ruby-spec: Accept both a backtick and a single quote in error messages
Diffstat (limited to 'spec/ruby/core/basicobject')
-rw-r--r--spec/ruby/core/basicobject/singleton_method_added_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/basicobject/singleton_method_added_spec.rb b/spec/ruby/core/basicobject/singleton_method_added_spec.rb
index ab6b2a2d10..fc65a091aa 100644
--- a/spec/ruby/core/basicobject/singleton_method_added_spec.rb
+++ b/spec/ruby/core/basicobject/singleton_method_added_spec.rb
@@ -94,7 +94,7 @@ describe "BasicObject#singleton_method_added" do
-> {
def self.foo
end
- }.should raise_error(NoMethodError, /undefined method `singleton_method_added' for/)
+ }.should raise_error(NoMethodError, /undefined method [`']singleton_method_added' for/)
end
end
@@ -106,16 +106,16 @@ describe "BasicObject#singleton_method_added" do
-> {
def foo
end
- }.should raise_error(NoMethodError, /undefined method `singleton_method_added' for #<Object:/)
+ }.should raise_error(NoMethodError, /undefined method [`']singleton_method_added' for #<Object:/)
-> {
define_method(:bar) {}
- }.should raise_error(NoMethodError, /undefined method `singleton_method_added' for #<Object:/)
+ }.should raise_error(NoMethodError, /undefined method [`']singleton_method_added' for #<Object:/)
end
-> {
object.define_singleton_method(:baz) {}
- }.should raise_error(NoMethodError, /undefined method `singleton_method_added' for #<Object:/)
+ }.should raise_error(NoMethodError, /undefined method [`']singleton_method_added' for #<Object:/)
end
it "calls #method_missing" do