summaryrefslogtreecommitdiff
path: root/spec/ruby/core/true/singleton_method_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/true/singleton_method_spec.rb')
-rw-r--r--spec/ruby/core/true/singleton_method_spec.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/true/singleton_method_spec.rb b/spec/ruby/core/true/singleton_method_spec.rb
index c06793850f..58689fb6e5 100644
--- a/spec/ruby/core/true/singleton_method_spec.rb
+++ b/spec/ruby/core/true/singleton_method_spec.rb
@@ -1,15 +1,13 @@
require_relative '../../spec_helper'
describe "TrueClass#singleton_method" do
- ruby_version_is '3.3' do
- it "raises regardless of whether TrueClass defines the method" do
- -> { true.singleton_method(:foo) }.should raise_error(NameError)
- begin
- def (true).foo; end
- -> { true.singleton_method(:foo) }.should raise_error(NameError)
- ensure
- TrueClass.send(:remove_method, :foo)
- end
+ it "raises regardless of whether TrueClass defines the method" do
+ -> { true.singleton_method(:foo) }.should.raise(NameError)
+ begin
+ def (true).foo; end
+ -> { true.singleton_method(:foo) }.should.raise(NameError)
+ ensure
+ TrueClass.send(:remove_method, :foo)
end
end
end