summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/delete_prefix_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/delete_prefix_spec.rb')
-rw-r--r--spec/ruby/core/string/delete_prefix_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/string/delete_prefix_spec.rb b/spec/ruby/core/string/delete_prefix_spec.rb
index 4b4858c9c2..b88c503658 100644
--- a/spec/ruby/core/string/delete_prefix_spec.rb
+++ b/spec/ruby/core/string/delete_prefix_spec.rb
@@ -73,9 +73,9 @@ ruby_version_is '2.5' do
end
it "raises a #{frozen_error_class} when self is frozen" do
- lambda { 'hello'.freeze.delete_prefix!('hell') }.should raise_error(frozen_error_class)
- lambda { 'hello'.freeze.delete_prefix!('') }.should raise_error(frozen_error_class)
- lambda { ''.freeze.delete_prefix!('') }.should raise_error(frozen_error_class)
+ -> { 'hello'.freeze.delete_prefix!('hell') }.should raise_error(frozen_error_class)
+ -> { 'hello'.freeze.delete_prefix!('') }.should raise_error(frozen_error_class)
+ -> { ''.freeze.delete_prefix!('') }.should raise_error(frozen_error_class)
end
end
end